NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
P-4
Examples—PAGE_NUMBER
Examples—PAGE_NUMBER
The following example prints a page number on the title line of a report:
S> PAGE TITLE TAB 40, "Monthly Report -", PAGE_NUMBER AS I2;
The output looks like this:
Monthly Report - 6
PAGE TITLE Command
PAGE TITLE is an SQLCI report writer command that specifies text for the top of each
report page.
print-item
specifies an item to print in the page title. The form for print-item is the same
as in the DETAIL command, except that it cannot include the HEADING,
NOHEAD, or NAME clause. (See DETAIL Command
on page D-43 for more
information.)
If you specify a column for print-item, SQL uses the value of the column in the
first detail line on the page. If a detail line is continued from the previous page, SQL
uses the value from the SELECT output row that contains the detail line data.
CENTER
centers each line of the page title between the left and right margins. If you omit
CENTER, the page title starts at the left margin.
Considerations—PAGE TITLE
Placement of page title
A blank line separates the page title from the body of the report. On the first page,
the page title appears above the report title.
Each PAGE TITLE command replaces the previous one
Only one PAGE TITLE command is in effect at a time. When you enter a PAGE
TITLE command, it replaces the previous one.
Print list limited to 4072 bytes of printed output
The output of a PAGE TITLE command is a logical line, even though (depending on
margin settings, device widths, and use of the SKIP clause) it might print on more
than one physical line. A logical line is limited to 4072 bytes, including the field
widths of all print items and the number of spaces between items.
[ PAGE ] TITLE print-item [,print-item]...[ CENTER ] ;