SQL/MX Report Writer Guide

Customizing a Report
HP NonStop SQL/MX Report Writer Guide527194-002
4-6
Paginating
Paginating
The report writer features that control where page breaks occur in a report are:
PAGE_LENGTH Specifies the number of lines from the top to the bottom of a
page. For example, to set a page length of 55 lines, enter:
>> SET LAYOUT PAGE_LENGTH 55;
Default page length for a printed report = 60 lines.
Default page length on a terminal is ALL. (The entire report is a
single page unless you specify the PAGE clause.)
When designing your report, remember that the default top and
bottom margins (1 line each) and the lines of the page footing fit
within the page length. The report writer uses the remaining
space for detail lines, titles, footings, subtotals, and totals.
PAGE clause Specifies a page break in detail lines, titles, and footings.
Use the clause:
PAGE number
number specifies the number on the next page and starts a new
page numbering sequence.
If you omit number, the current sequence continues.
For example, to specify a page break after each break footing is
printed, enter:
S> BREAK FOOTING JOBCODE ( 'Job Title: ',
+> JOBDESC, PAGE);
In this example, one numbering sequence is used from the
beginning to the end of the report.
NEED clause Specifies the number of subsequent lines that must fit on the
current page in detail lines, titles, and footings.
Use the clause:
NEED number
number specifies the number of lines required.
If the lines do not fit, a page break occurs. For example, to specify
that the break title must be printed on the next page unless the
next 4 lines of output fit on the current page, enter:
S> BREAK TITLE JOBCODE ( NEED 4, 'Job Code: ',
+> JOBCODE);