On line guide/help
You are on page 33 of the online help. Navigate sequentially through the guide pages or search for a topic of interest to you.
Index Prev. NextSystem variables
Automatic placeholders
There are special placeholders, called system variables, that are automatically replaced with their respective values without the need to use custom variables and set them using PHP code. Here's the complete list:
- {CURRENTDATE} Current system date (format dd/mm/yyyy)
- {CURRENTTIME} Current system time (format hh:mm:ss)
- {PAGEINDEX} Current page number (1, 2, 3, ..)
- {PAGECOUNT} Total number of pages of the document, eg. Page {PAGEINDEX} of {PAGECOUNT} (version 1.0.12 or later, see the notes below)
- {section_id.PAGEINDEX} Page number within the data section with the given id, eg. {ord_det.PAGEINDEX}
- {Y} Current Y position of the data section being processed (start position of the current data row)
- {RAND1} 1 digit random number
- {RAND2} 2 digit random number
- {RAND3} 3 digit random number
- {RAND4} 4 digit random number
- {RAND5} 5 digit random number
- {RAND6} 6 digit random number
- {RAND7} 7 digit random number
- {RAND8} 8 digit random number
The format settings (NUMERICDECIMALSEPARATOR, CURRENCYSYMBOL, ..) are also stored in variables: see the Value formatting page.
{PAGECOUNT} is the total number of pages of the whole document (version 1.0.12 or later; in the previous versions it had the same value as {PAGEINDEX}). The total is known only at the end, so when the template, or a variable, contains {PAGECOUNT} the report is built twice: the first pass only counts the pages, the second one prints the document, and the data providers are executed twice. Templates without {PAGECOUNT} are built once.
In a report with more documents (eg. one invoice for each master data row) {PAGECOUNT} is the total of all the documents: for the pages of each document use {section_id.PAGEINDEX} and a value calculated in the query, eg. {inv.pagesCount}.