Including a Page Footing in a Report: FOOTING

The counterpart of a page heading is the page footing. You can include a footing in your report using the FOOTING command. Footings, like headings, appear on each page of the report. The footing, by default, is left-justified and positioned two (2) lines below the last line of output in the report, even if the output is not at the end of the page.

FOOTING is similar to HEADING in the way it works. Here are some simple rules for using FOOTING in your requests:

Now, you can enhance the report you just produced by adding a centered footing.

In this report, you can also change the default location of each page number. To do this, use a system variable, called TABPAGENO, as part of a page, section, or report heading or footing. A system variable represents values supplied automatically, in this case, the page number. Referencing TABPAGENO automatically turns off the default page number location. If you want heading or footing text made up solely of the page number, type the following on the line after HEADING or FOOTING:

"<TABPAGENO"

The caret or less than symbol (<) signals that the next item in a heading or footing object is a system variable, such as TABPAGENO, or a field name. You can also include prior RECAP values in a heading or footing.

Issue the following request:

TABLE FILE EMPLOYEE
HEADING CENTER
"EMPLOYEES WHO LIVE IN NEW YORK STATE"
" "
PRINT ADDRESS_LN3 AS 'CITY STATE AND ZIP'
BY LAST_NAME AS 'EMPLOYEE'
WHERE ADDRESS_LN3 CONTAINS 'NY';
FOOTING CENTER
"PAGE <TABPAGENO"
END

Run the request. The output is:

Notice the difference between this report and the first one you generated. This report has a centered footing which consists of only the page number. Each page has the correct page number even though you do not supply the numbers in the request. These numbers are provided by the TABPAGENO system variable. The new location of the page numbers is achieved by using TABPAGENO in conjunction with FOOTING CENTER. As you progress through this chapter, you learn that you can increase control of a report format by using different combinations of commands.

WebFOCUS

Feedback