Prints a footer at the bottom of each output page.
FOOTING [ON channel] footer
||Optional An integer that specifies a logical print channel. The default is 0.
||The footer to print on output pages, specified as a string enclosed in double quotation marks. This footer can consist of any combination of literal text and code characters. Code character letters are enclosed in single quote characters, and are not case-sensitive.
statement prints a footer at the bottom of each page of printed output text. The footer
can consist of a literal text and code characters that either specify text (for example, include the current date), or control the printing of footer text (for example, center the footer). A footer
is always enclosed in double quotation marks. To include letter code characters, enclose them in single quotation marks. To include a literal single quotation mark, double it. For example: "Mary''s Report"
operation can be reversed using PRINTER RESET
, which resets the footing (and heading) to null.
The optional channel
specifies the logical print channel for this output. The range of available values is -1 through 255 (inclusive). If channel
=-1, output is displayed on the terminal screen. If channel
is not specified, the default logical print channel is 0.
The following are the available code characters that supply footer text:
||Include current date formatted as dd mmm yyyy. For example, 11 Sep 2006.
|Include current time and date formatted as hh:mm:ss dd mmm yyyy. Time is in 12hour format with am or pm appended. For example, 7:45:22pm 11 Sep 2006 .
|Include current page number, right-aligned. The default alignment is 4 digits. You can specify a larger or smaller alignment by appending an integer to 'P'. For example, 'P2'. This code specifies the page number position and alignment; the PAGE statement defines the actual page number value.
||Include current page number, left-aligned. This code specifies the page number position and alignment; the PAGE statement defines the actual page number value.
||Include record ID, left-justified.
The 'S' and 'P' code characters specify whether an increasing number of digits (1, 10, 100, etc.) should expand the page number to the left or to the right. These code characters can be included at any point within the text of a footer. The page number appears at that point, either left-aligned ('S') or right-aligned ('P'). By default, both 'S' and 'P' are left-justified. To right-justify a page number, use the 'G' code, as follows: 'GS' or 'GP'.
The following are the available code characters that format footer text:
||Center the footer. You can adjust centering alignment by appending an integer to 'C'. For example, 'C15'. You can also center a footer using the 'G' code character.
||Insert spaces to evenly distribute the footer across the full available width. You can specify multiple 'G' codes within a footer.
|Line break. Text after line break defaults to left-justified.
||Suppress automatic paging.
||Treat \, ], and ^ as literals, not code characters for rest of footer.
By default, a footer is left-justified. To right-justify a footer, specify a 'G' before the footer text: "'G'Annual Report"
. To center a footer, specify a 'G' before and after the text: "'G'Annual Report'G'"
. To spread out the parts of a footer, specify a 'G' between literals in the footer: "'G'Annual'G'Report'G'"
By default, the backslash (\), right square bracket (]), and caret (^) are code characters. To include these characters as literals in a footer, use the 'Q' code character. Any instances of these three characters following the 'Q' code in the footer are treated as literals, not code characters.
statement places text at the bottom of each page. The HEADING
statement places text at the top of each page. The PAGE
statement advances printing to the next page and prints any defined heading or footing on that page.
The following example centers the current date at the bottom of each page. Note that the footer must be enclosed in double quotation marks, even when there is no literal footer text:
The following example centers two lines of footer, with the page number right-justified on the first footer line:
FOOTING "'G'Big Widgets Corporation'GS''LC'First Quarter Report"
The following example left-justifies two lines of footer, with the page number at the end of the first footer line and the time and date at the end of the second footer line. Note that the punctuation code characters are not enclosed in single quotes:
FOOTING "Big Widgets Corporation^]First Quarter Report \"
© 1997-2019 InterSystems Corporation, Cambridge, MA