SQL/MP Report Writer Guide
Table Of Contents
- What’s New in This Manual
- About This Manual
- 1 Introduction to the NonStop SQL/MP Report Writer
- 2 Using SQLCI and the Report Writer
- 3 Selecting Data for a Report
- 4 Customizing a Report- Defining the Layout
- Specifying the Items in a Detail Line
- Naming Select List and Detail Line Items
- Organizing Rows Into Break Groups
- Labeling Information
- Formatting Data Values
- Formatting Dates and Times
- Using TACL to Pass Parameters
- Conditional Printing of Items or Line Entries
- Redefining Special Characters
- Calculating Totals
- Calculating Subtotals
- Printing Double-Byte Characters
 
- A Comparison of the Report Writer and the Enform Language
- Index
Customizing a Report
HP NonStop SQL/MP Report Writer Guide—527213-001
4-5
Defining the Layout
You can specify the maximum number of pages to be printed in a report by setting the 
PAGE_COUNT layout option. For example, the following command sets the limit to 
100 pages:
>> SET LAYOUT PAGE_COUNT 100;
The default PAGE_COUNT value is ALL; the entire report is printed or displayed.
If you want to number the pages in a report, you can use the PAGE_NUMBER function 
to retrieve the number of the current page. The first page of the report is numbered 1. 
The report writer maintains the page count based on the page breaks that occur. 
These page breaks include page breaks generated by a PAGE clause or a NEED 
clause.
PAGE_LENGTH This layout option specifies the number of lines from the top to 
the bottom of a page. For example, the following command sets 
a page length of 55 lines:
>> SET LAYOUT PAGE_LENGTH 55;
The default page length for a printed report is 60 lines. On a 
terminal, the default page length 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 In detail lines, titles, and footings, you can specify a page break 
by including the print item PAGE 
number. The variable number 
specifies the number of the next page and starts a new page 
numbering sequence. If you omit 
number, the current sequence 
continues. For example, the following command specifies a 
page break after each break footing is printed:
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 In detail lines, titles, and footings, you can specify the number of 
subsequent lines that must fit on the current page. If the lines do 
not fit, a page break occurs. For example, the following 
command specifies that the break title must be printed on the 
next page unless the next 4 lines of output fit on the current 
page:
S> BREAK TITLE JOBCODE ( NEED 4, "Job Code: 
",
+> JOBCODE);










