SQL/MX Report Writer Guide

Customizing a Report
HP NonStop SQL/MX Report Writer Guide527194-002
4-23
Break Titles
You can delete the break title associated with each specified break column by using
the RESET REPORT BREAK TITLE ( column-list) command.
To include an unnamed item from the detail line in a break title, you must define a
detail alias name for the item.
In this 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.
>> 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 NEXT 8;
Figure 4-9 shows the first eight rows of the report.