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-21
Labeling Information
Break Titles
You can specify a break title for each break group. You can have more than one
BREAK TITLE command in effect at a time, but each command must relate to a
different break column.
In a break title, you can include columns from the select list, named print items from
the DETAIL print list, string literals, and arithmetic expressions. If a column identifier is
used as a print item in a BREAK TITLE command, the value for that item is taken from
the first detail line of the break group.
You must enclose the print list of a BREAK TITLE command in parentheses.
You can delete the break title associated with each specified break column by using
the RESET REPORT BREAK TITLE (
column-list) command.
If you want to include an unnamed item from the detail line in a break title, you must
define a detail alias name for the item.
In the following example, a report generates break titles for two break groups—one for
each customer and one for each order. The CUSTNUM value in the first title is taken
from the first row of each customer break group. The ORDERNUM value is taken from
the first row of each order break group.
>> VOLUME SALES;
>> SELECT *
+> FROM CUSTOMER C, ORDERS R, ODETAIL OD
+> WHERE C.CUSTNUM = R.CUSTNUM
+> AND R.ORDERNUM = OD.ORDERNUM
+> ORDER BY C.CUSTNUM, R.ORDERNUM;
S> DETAIL TAB 24,
+> PARTNUM HEADING "Part No.",
+> QTY_ORDERED HEADING "Quantity";
S> BREAK ON C.CUSTNUM, CUSTNAME, R.ORDERNUM;
S> BREAK TITLE C.CUSTNUM
+> (SKIP 1,
+> "Customer No.",
+> C.CUSTNUM,
+> SKIP 1,
+> CUSTNAME );
S> BREAK TITLE R.ORDERNUM
+> (TAB 5,
+> "Order No.",
+> R.ORDERNUM AS I8);
S> LIST N 8;
Figure 4-9 shows the first eight rows of the report.