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-19
Labeling Information
•
A page title appears at the top of each page of a report.
•
A report title follows the page title on the first page of the report.
•
A break title precedes the break group for which it is defined.
Only one REPORT TITLE and one PAGE TITLE command are in effect at a time.
There can be one BREAK TITLE command for each item specified in a BREAK ON
command. You can edit a command by using FC, replace a command by reentering it,
or delete a command by using RESET REPORT.
Page and Report Titles
The following commands produce a page and report title for the supplier parts
summary:
S> PAGE TITLE "Supplier Parts Summary" CENTER;
S> REPORT TITLE "Date: ", CURRENT_TIMESTAMP AS DATE *,
+> TAB 40, "Author: Sarah Verdi";
The right margin is 65. The page title is centered. Titles on the first page appear as
shown in Figure 4-7
.
A blank line follows the page title and the report title. The report title appears only on
the first page of the report.
You can include columns from the select list, named print items from the DETAIL print
list, string literals, and arithmetic expressions in a title. If you want 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, the following
commands specify that the page title include a customer number:
>> SELECT *
+> FROM SALES.CUSTOMER C, SALES.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;
Figure 4-7. Example of Report and Page Titles
Supplier Parts Summary
Author : Sarah VerdiDate : 04/25/87
( The body of the report begins here.)
VST0407.vsd