Function |
Description |
Example |
Count() |
Counts the number of values. |
Count the ID field to produce a count of records: |
Sum() |
Calculates the sum of the parameter. |
Sum the total losses listed in a table: |
Avg() |
Calculates the average of a set of values. |
Average the total losses in a table: Avg(Total Loss) - - ‘$430.00’ |
Precalc() |
Used when a calculation is required before the final output, such as in a table header before the table data is printed. |
To display the count of records for a table in the header line: Precalc(Count(ID)) - - ‘350’ |
Now() |
Displays the current date/time. |
To display the current date and time in a cell or text box, used with the Date$ function: Date$(Now()) - - ‘03/10/2015 1:00:00PM |
Day() or Day$() |
Displays the day of the date data as a number or name. |
Day(Reported Date/Time) - - ‘3’ Day$(Reported Date/Time) - - ‘Tuesday’ |
Month() or Month$() |
Displays the month of the date data as a number or name. |
Month(Reported Date/Time) - - ‘3’ Month$(Reported Date/Time) - - ‘March’ |
Quarter() |
Displays the numerical value of the quarter of the date data. |
To display the quarter an incident was reported: Quarter(Reported Date/Time) - - ‘1’ |
Year() or Year$() |
Displays the numerical value of the year of the date data. |
To display the current year: Year(Now()) - - ‘2015’ To display the year an incident was reported: Year$(Reported Date/Time) - - ‘2015’ |
Date$() |
Converts a date value to a string. A date format will need to be added (Date tab). |
To display the current date and time in a cell or text box: Date$(Now()) - - ‘03/10/2015 1:00:00PM’ |
Page$() |
Displays the current page number. |
Prints the current page number: Page$() - - ‘1’ |
TotalPages$() |
Will display the total number of pages. |
Prints the total pages of the report: TotalPages$() - - ‘10’ |
IsNullOrEmpty() |
Checks if a value is null or empty, used as part of a condition. |
To see if incident category is blank: IsNullOrEmpty(Category) - - ‘True’ |
SetVar() |
Stores a value for later use. An alias is assigned to the value which will be referenced in a different function. |
A table shows the calculation of incidents from 2014 (350 records for example), you wish to save this count for later use: SetVar(“2014”,Count(ID)) |
GetVar() |
Returns the value of the SetVar() function. |
To retrieve and display the count of 2014: GetVar(“2014”) - - ‘350’ |
UnitFromSCM() |
Converts a SCM unit (1/1000mm) to a print unit (inch/mm), used for defining properties values of an object. Primarily used when changing the orientation of the page mid-report. This ensures the report container maintains shape/size. |
For a report container size 7.5” wide and 9” high: LL.Device.Page.Size.cx-UnitFromSCM(25400) is 7.5” · 1 inch less the page width (LL.Device.Page.Size.cx) LL.Device.Page.Size.cx-UnitFromSCM(50800) is 9” 2 inches less the page height (LL.Device.Page.Size.cy) |
Commonly Used Functions in Custom Reports
Follow
Have more questions? Submit a request