Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Besides the standard fields, the user-defined fields are also used in report layouts.

The "New" option of the Defined Fields list accessed by clicking the Defined Fields button is used to define new fields for the report. The name, type and usage type information of the field to be used in the report is entered in the Definition window.


The user defined fields may have the

  • Text
  • Number
  • Date
  • Time
  • Currency

types.

The information recorded on the Defined Field window varies depending on the selected type.

The usage type of the information in the defined field within the report is specified in the Parameters, Format and Location tabs of the Field window accessed by selecting the New -> Data Field option located in the right mouse button menu of the New Report Design window. The options displayed here also depend on the field type and the selection made on the display section. The Type and

The  Type and Name fields of the Defined Field window indicate the type and name of the defined field. Each field definition is saved with a different name. The currency information is saved in the Currency field for the fields of Number and Currency types.

Definition

The Type and Name fields of the Defined Field window indicate the type and name of the defined field. Each field definition is saved with a different name. The currency information is saved in the Currency field for the fields of Number and Currency types. 

Formula Usage

The most important feature of the user defined field is that these fields can be used in formulas together with the standard fields defined in the application through functions and arithmetical operations, and that the results can be inserted in a field. 

In this way, the information inserted from the records and the transactions performed on the application sections can be reported with the requested format and information. The relation to be established for the information to be inserted in the defined field is recorded in the Formula field. 

The Formula window accessed by clicking the Formula field consists of three panes. The Formula pane displays the formula definition indicating how the information to be inserted in the report will be calculated. The middle pane displays the icons of the arithmetical operations that can be used in the formula, while the bottom pane lists the Standard FieldsUser Defined Fields and Functions as columns.

The requested fields and functions are used together and associated with arithmetic operations and saved. 

The additional info definitions and additional data fields can also be used in the formula definition along with the fields and functions. The database extensions and data fields are listed and a selection is made. 


The Functions Used in Reports and Forms

Function List

1

MIN(number, number)

2

MAX(number, number)

3

MOD(number, divisor)

4

DIV(number, divisor)

5

ABS(number)

6

VAL(text)

7

DATE(day, month, year)

8

AFTER(days, year)

9

DAYS(firstdate, lastdate)

10

DAYOF(date)

11

MONTHOF(date)

12

YEAROF(date)

13

WDAYOF(date)

14

ROUND(number)

15

TRUNC(number)

16

ERATE(date, currency)

17

CREATE(date, base curr., base rate, dest. curr)

18

STRPOS(search string, string)

19

FLOOR(number)

20

CEIL(number)

21

FRAC(number)

22

EXP(number)

23

LN(number)

24

POWER(base, exponent)

25

SQR(number)

26

SQRT(number)

27

COS(number)

28

SIN(number)

29

TAN(number)

30

STRLEN(text)

31

WEEKNUM(year start, first week, date)

32

STR(number)

33

DATESTR(date, format)

34

MONTHSTR(month)

35

WDAYSTR(weekday)

36

NUMSTR(number, decimals, format)

37

TIMESTR(time, format)

38

RESXSTR(list resource, tag)

39

RESSTR(string resource)

40

CRESSTR(list id., tag)

41

SUBSTR(text, start, length)

42

UPCASE(text)

43

LOWCASE(text)

44

TRIMSPC(text, option)

45

JUSTIFY(text, direction, fill, length)

46

WRNUM(language, numer, part)

47

IF(expression, value1, value2)


Function Usage

1

MIN(number, number)

Takes the minimum number of the function. 
MIN(5, 6) = 5

2

MAX(number, number)

Takes the maximum number of the function. 
MAX(5, 6) = 6

3

MOD(number, divisor)

Divides the higher value into the lower value and takes the remainder. 
MOD(35, 6) = 5 
MOD(42, 7) = 0

4

DIV(number, divisor)

Divides the number to the second and writes the result. 
DIV(35,6) = 5 
DIV(42, 7) = 6

5

ABS(number)

Gives the absolute value of a number. 
ABS(7) = 7 
ABS(-7) = 7

6

VAL(text)

Converts the text into a numeric value. 
VAL("1000") = 1000

7

DATE(day, month, year)

Converts date format according to day, month and year info. 
DATE(31, 12, 2000) = 31.12.2000

8

AFTER(days, year)

Gives the attained date after given number of days. 
AFTER(10, DATE(10,02,2001)) = 20.02.2001 
AFTER(10, [Date of the day]) = 15.02.2001 (If date of the day is 05.02.2001)

9

DAYS(firstdate, lastdate)

Gives number of days between two dates. 
DAYS(DATE(13,10,2000), DATE(21,10,2000)) = 8

10

DAYOF(date)

Gives date of the day. 
DAYOF(DATE(10,12,2000)) = 10

11

MONTHOF(date)

Gives the current month. 
MONTHOF(DATE(10,12,2000)) = 12

12

YEAROF(date)

Gives the current year. 
YEAROF (DATE(10,12,2000)) = 2000

13

WDAYOF(date)

Gives the date that shows which day of the week is the given date. 
WDAYOF (DATE(30,03,2001)) = 5

14

ROUND(number)

Rounds the given number to nearest integer. 
ROUND(5.25) = 5 
ROUND(5.61) = 6

15

TRUNC(number)

Eliminates the decimal characters if the number within parenthesis is decimal. 
TRUNC(5.25) = 5 
TRUNC(26.85) = 26

16

ERATE(date, currency)

Brings the exchange rate of a currency for a specific date. 
ERATE(DATE(05,05,2002),20) 
Brings the EURO exchange rate in 05,05,2002.

17

CREATE(date, base curr., base rate, dest. curr)

Brings cross exchange rate value of the f. currency. 
CREATE(DATE(05,05,2002),1,1500,20) = 1.453,25

18

STRPOS(search string, string)

Gives the sequence of a character in a text. 
STRPOS("L",PENCIL") = 5

19

FLOOR(number)

Rounds the decimal number to downwards 
FLOOR(2,8) = 2 
FLOOR(-2,8) = -3

20

CEIL(number)

Rounds the decimal number upwards. 
CEIL(15.25) = 16 
CEIL(15.75) = 16

21

FRAC(number)

Takes the decimal value of the number and rounds it to nearest value.
FRAC(3,15) = 0 
FRAC(-3,15) = 0 
FRAC(3,75) = 1 
FRAC(-3,75) = -1

22

EXP(number)

The opposite of the logarithm (ln) function. 
EXP(1)= 3 (approximate value of e) 
EXP(2)= 7

23

LN(number)

The logarithm function. According to "e" base it transforms logarithm function result to nearest integer. 
LN(2) = 1 
EXP (LN (5)) = 5

24

POWER(base, exponent)

Gives specified power of a number. 
POWER(9,2) = 81 (92
POWER(2,3) = 8 (23)

25

SQR(number)

Gives the square of a number. 
SQR(2) = 4 
SQR(7) = 49

26

SQRT(number)

Gives the square root of a number.  
SQRT(81) = 9 
SQRT(225) = 15

27

COS(number)

Gives the cosine of a number (given as radiant). 
COS(0) = 1

28

SIN(number)

Gives sine of a number(given as radiant).

29

TAN(number)

Gives tangent of a number (given as radiant).

30

STRLEN(text)

Gives the total number of characters of selected text; its type is number. 
STRLEN("abcdefg") = 7 
STRLEN("999") = 3

31

WEEKNUM(year start, first week, date)

Gives the week number of the related year. First week parameter works as in MS Outlook. 
WEEKNUM (DATE(01,01,2002),1, Delivery Date)

32

STR(number)

Writes field defined as numbers in text format. 
STR(1234) = 1234

33

DATESTR(date, format)

Transforms the given date and writes it in demanded format. 
DATESTR(DATE(23,12,2001),1) = 12.23.2001 
DATESTR(DATE(23,12,2001),2) = 23.12.2001

34

MONTHSTR(month)

Writes the month of the given number as text. 
MONTHSTR(2) = February 
MONTHSTR(12) = December

35

WDAYSTR(weekday)

Writes the day of the given number as text. 
WDAYSTR(3) = Wednesday 
WDAYSTR(5) = Friday

36

NUMSTR(number, decimals, format)

Transforms the given number to text and writes in demanded form. 
NUMSTR(1234,3,1) = 1234 
NUMSTR(1234,3,6) = 1234,000 % 
NUMSTR(1234,2,7) = 1.234,00 
NUMSTR(-1234,1,1) = 1.234,0 (A)

37

TIMESTR(time, format)

Transforms the given hour to text and writes in demanded form.

38

RESXSTR(list resource, tag)

Brings the list source and its tag of LRF extended files of resource folder. 
RESXSTR(25550,1) = Material Code 
RESXSTR(25550,2) = Material Description

39

RESSTR(string resource)

Brings the texts in LRF extended files of resource folder. 
RESSTR(29057) = No matching record.

40

CRESSTR(list id., tag)


41

SUBSTR(text, start, length)

Used to write the selected text in a definite length by starting from a definite character. 
SUBSTR("abcdef",2,3) = bcd 
SUBSTR("abcdef",1,4) = abcd

42

UPCASE(text)

Writes the text with capital letters. 
UPCASE("Text") = TEXT

43

LOWCASE(text)

Writes the text with lower cases. 
LOWCASE("Text") = text

44

TRIMSPC(text, option)

Deletes the spaces at the beginning and/or at the end of the selected text). 
TRIMSPC(" ABC ",1) = ABC 
TRIMSPC(" ABC ",2) = ABC 
TRIMSPC(" ABC ",3) = ABC

45

JUSTIFY(text, direction, fill, length)

Writes the selected text in demanded length. Fills the spaces with demanded characters in text. 
JUSTIFY(STR(4),1,"0",3) = 004 
JUSTIFY("ABC",2,"F",7) = FFABCFF

46

WRNUM(language, numer, part)

Transforms a number's integer or decimal digits to writing form in specified language. 
WRNUM(1,100,1) = One Hundred 
WRNUM(2,1000,1) = One Thousand 
WRNUM(1,100.05,2) = Five 
WRNUM(4,100.05,1) = Ein(s)Hundert

47

IF(expression, value1, value2)

Specifies values by defining conditions. When "If (p1>1000, 10,5)" is typed, if p1 is bigger than 1000 the value is used as 10; otherwise as 5.


Updating Defined Fields

To update the Defined Fields list, the "Update" button is clicked while the definition line to be updated is selected. The changes made to the definition information are recorded by clicking the "Save" button. 

Deleting a Field Definition

To delete a field definition from the Defined Fields list, the "Delete" button is clicked while the definition line to be deleted is selected. The Del key can also be used for this operation. 

Using Defined Fields

The defined fields are inserted into the desired section of the report using the New -> Data Field option. The field type is specified as defined field in the type / content tab of the field window accessed by making the new selection. The defined fields are listed and the appropriate definition is selected and transferred into the report. 

Defined Field Types

The font and style to be used in the field is specified on the Format tab of the Field window. The following properties are specified on the Format tab: 

Image Added 

The information saved in the Display section varies depending on the field type (text, number, date, hour, currency, etc..) 

The Font section is used to specify the font type to be used. The appropriate font is selected by clicking the arrow icon and the font size is specified on the Size field. The other font properties and defaults to be applied (compressed, underlined, color) are specified on the Fonts window accessed by clicking the "..." icon. 

The Color section is used to specify the background color of the field. The color options are listed by clicking the arrow sign and the requested color is selected. In addition to selecting from defined colors, new colors can be defined and saved on the Color window accessed by clicking the palette window. 


Text Fields

If the type of the defined field is Text, the Text field of the Format tab contains the Left JustifiedRight Justified and Centered options. The Text type information of the report is displayed according to the selection made in this field. The font type, size and color are specified on the Font field, while the Color section is used to specify the color of the defined field. 
The position of the field on the report is specified on the Location tab and the parametric properties are specified on the Parameters tab. 


Number Fields

If the type of the defined field is Number, the display method of the numeric information is specified on the Format tab. The digit separations and the display method of fractional amounts and percentages are displayed and selected on the amount fields. The position of the Number type information within the field is specified in the Text field and the font type, size and color are specified on the Font field, while the Color section is used to specify the color of the defined field. The position of the field on the report is specified on the Location tab and the parametric properties are specified on the Parameters tab. 


Date Fields

If the type of the defined field is Date, the display method of the date information is specified on the Format tab. The date can be displayed as day/month/year or month/day/year, or the name of the day can be displayed. The display method to be used is selected and transferred into the field. The position of the Date type information within the field is specified in the Textfield and the font type, size and color are specified on the Font field, while the Color section is used to specify the color of the defined field. The position of the field on the report is specified on the Location tab and the parametric properties are specified on the Parameters tab. 


Hour Fields

If the type of the defined field is Hour, the display method of the hour information is specified on the Format tab. The display method to be used is selected and transferred into the field. The position of the Hour type information within the field is specified in the Text field and the font type, size and color are specified on the Font field, while the Color section is used to specify the color of the defined field. The position of the field on the report is specified on the Location tab and the parametric properties are specified on the Parameters tab. 


Currency Fields

If the type of the defined field is Currency, the display method is specified on the Format tab. The display method to be used is selected and transferred into the field. The position of the Currency type information within the field is specified in the Text field and the font type, size and color are specified on the Font field, while the Color section is used to specify the color of the defined field. The position of the field on the report is specified on the Location tab and the parametric properties are specified on the Parameters tab. 

Image Added