SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
P-3
Considerations—PAGE_LENGTH
number
is an integer in the range 1 through 32,767 that specifies the number of lines per
report page. number must be large enough to print at least one detail line (or a
total or subtotal line, if specified) plus any page title and page footing.
Considerations—PAGE_LENGTH
Each report page begins with the page title (if defined) and ends with a page
footing (if defined). The space left for the body of the report (detail lines, headings,
subtotals, totals, and so forth) is the page length minus the space used for the
page title and page footing and the blank lines that separate the page title and
footing from the other lines.
If you direct a report to a line printer or process, SQL sends a form feed (ASCII 0C
or control-L) before each new page. If you direct the report to a disk file, SQL does
not send a form feed.
Example—PAGE_LENGTH
This example sets the page length to 66 lines:
>> SET LAYOUT PAGE_LENGTH 66;
PAGE_NUMBER Function
PAGE_NUMBER is an SQLCI report writer function that returns the page number of
the current report page. You can use PAGE_NUMBER in the BREAK FOOTING,
BREAK TITLE, DETAIL, PAGE FOOTING, PAGE TITLE, REPORT FOOTING, and
REPORT TITLE report writer commands.
Considerations—PAGE_NUMBER
Normally, report pages are numbered from 1, but you can modify the sequence of
page numbers with the PAGE clause in a print list or in the DETAIL command. If
you do so, PAGE_NUMBER returns the modified number. For more information,
see DETAIL Command on page D-47.
The default display format for the page number is I11.
Example—PAGE_NUMBER
This example prints a page number on the title line of a report:
S> PAGE TITLE TAB 40, "Monthly Report -", PAGE_NUMBER AS I2;
PAGE_NUMBER