Using form variables
Form variables are codes that you can insert into text fields to produce information on the report.
For example, you can insert a date variable to produce the current date whenever the report is printed. The following form variables are available:
- &ROW: This variable will display the number of the current row of data.
- &DATE: This variable will display the current date.
- &TIME: This variable will display the current time.
- &PAGE: This variable will display the current page number.
- &COUNT: This variable will display the number of rows retrieved or printed since the last break at the same level.
- &CALCid: This variable identifies a Form calculation expression to use, where "id" is the ID number of the expression.
- &n: This variable will display the value of a column, where "n" is the column number.
- &an: This variable will display the aggregation of a column, where "n" is the column number and "a" is one of the following aggregation variables: AVG, COUNT, CPCT, CSUM, FIRST, LAST, MAX, MIN, PCT, STDEV, SUM, TCPCT, or TPCT. The aggregation is based on the rows retrieved or printed since the last break at the same level.
- &Global Variables: This will display the value of the global variable.
- &HTML Variables: This will display the value of the HTML variable.
Different variables are available for use depending on the part of the form that you are editing. The following list shows the types of variables that you can use in each part of a form:
- Page Heading: You can use all variables except &an, &COUNT, or &CALCid.
- Page Footing: You can use all variables except &an, &COUNT, or &CALCid.
- Break Heading: You can use all variables except &an, &COUNT, or &CALCid.
- Break Footing: You can use all variables.
- Calculation Expression: You can use all variables except &CALCid.
- Column Expression: You can use all variables except &Page, &an, &COUNT, or &CALCid.
- Condition You can use all variables except &Page, &an, &COUNT, or &CALCid.
- Detail Heading You can use all variables except &COUNT or &CALCid.
- Detail Block: You can use all variables.
- Final Text: You can use all variables.