SQL/MP Report Writer Guide

Customizing a Report
HP NonStop SQL/MP Report Writer Guide527213-001
4-24
Labeling Information
Break Footings
You can specify a break footing for each break group. You can have more than one
BREAK FOOTING command in effect at a time, but each command must relate to a
different break column.
You can include columns from the select list, named print items from the DETAIL print
list, string literals, and arithmetic expressions in a break footing. If a column identifier is
used as a print item in a BREAK FOOTING command, the value for that item is taken
from the last detail line of the break group.
You must enclose the print list of a BREAK FOOTING command in parentheses.
You can delete the break title associated with each specified break column by using
the RESET REPORT BREAK FOOTING (
column-list) command.
If you want to include an unnamed item from the detail line in a break footing, you must
define a detail alias name for the item.
In the following example, a report generates break footings for two break groups—one
for each customer and one for each order:
>> 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, DELIV_DATE DESC;
S> DETAIL CUSTNAME NOHEAD, SPACE 5,
+> PARTNUM HEADING "Part No.",
+> QTY_ORDERED HEADING "Quantity";
S> BREAK ON C.CUSTNUM, CUSTNAME, R.ORDERNUM;
S> BREAK FOOTING C.CUSTNUM
Figure 4-11. Example of a Page Footing
21 CENTRAL UNIVERSITY
UNIVERSITY WAY
PHILADELPHIA, PENNSYLVANIA
123 BROWN MEDICAL CO
..
..
..
7777 SLEEPWELL HOTELS
9000 PETERS AVENUE
DALLAS, TEXAS
Customer 7777
Page 4
VST0411.vsd