.Footer Statement--Begin Formatting Statements for the Footer
The .footer statement identifies the start of a block of formatting statements that are executed at the end of a break.
This statement has the following format:
.footer | .footing | .foot
report | page | columnname
The parameters for the .footer statement are as follows:
The following table shows the results obtained by specifying each of the options in the .footer statement:
report
Prints the footer at the end of the report.
page
Prints the footer at the bottom of each page.
columnname
Specifies a break column name in the list of the .sort or .break statement. Specify the column name as a delimited identifier by enclosing it in double quotes ("), if you have previously specified the .delimid statement.
Prints the footer at the end of a group of data rows with identical values for that break column. The columnname can be expressed as a variable.
$columnvariable
Variable whose value is the name of a column. Precede the variable with a dollar sign ($).
Description
The .footer statement starts the block of text formatting statements that define the action to be taken at the end of a break in the report.
If you specify a variable for columnname, Report-Writer evaluates the variable during the loading of the report specification, before retrieving any data.
Report-Writer considers all statements between one .footer statement and any subsequent .header, .footer, or .detail statement to be part of the first footer action.
Note: When using a variable for columnname, specify the same variable identically in corresponding .break, .sort, and .header statements.
Examples
1. Specify printing a page number at the bottom of each page
.footer page
.newline
.center
.print '-,' page_number (f2), '-'
.newline
2. Print the sum of column named "wholesale cost" (a delimited identifier), at the end of the report
.footer report
.tab 10
.print 'TOTAL COSTS: ', sum("wholesale cost"),
('$------.zz')
.newline
Last modified date: 01/30/2023