SQL/MX Report Writer Guide
Customizing a Report
HP NonStop SQL/MX Report Writer Guide—527194-002
4-21
Page and Report Titles
A blank line follows the page title and the report title. The report title appears only on
the first page of the report.
A title can include:
•
Columns from the select list
•
Named print items from the DETAIL print list
•
String literals
•
Arithmetic expressions
To include in a title an unnamed item from the detail line (for example, an expression),
you must define a detail alias name for the item.
The value used in the title is taken from the first output row on the page (for page titles)
and the first output row of the report (for report titles). For example, to specify that the
page title include a customer number, enter:
>> SELECT *
+> FROM CUSTOMER C,ORDERS O
+> WHERE C.CUSTNUM = O.CUSTNUM
+> ORDER BY C.CUSTNUM, ORDERNUM;
S> DETAIL C.CUSTNUM,
+> CUSTNAME,
+> STATE,
+> DELIV_DATE;
S> BREAK ON C.CUSTNUM, CUSTNAME, CITY, STATE;
S> PAGE TITLE 'Customer Delivery Summary ',
+> TAB 45,
+> 'Cust. No.',
+> C.CUSTNUM AS I4 ;
S> SET LAYOUT PAGE_LENGTH 10;
S> LIST NEXT 10;
Figure 4-8 shows the first nine rows of report output, which appears on four pages. The
customer number in each page title is taken from the first row of output on the page.
The page length, which is ten lines, accommodates these items:
•
The default top margin (a blank line)
•
A single-line title followed by a blank line
•
Two lines of headings followed by a blank line
•
Three detail lines
•
The default bottom margin (a blank line)
Figure 4-7. Report and Page Titles
Supplier Parts Summary
Author : Sarah VerdiDate : 04/25/87
( The body of the report begins here.)
VST0407.vsd