SQL/MX Report Writer Guide

Customizing a Report
HP NonStop SQL/MX Report Writer Guide527194-002
4-16
Organizing Rows Into Break Groups
+> QTY_ORDERED;
S> BREAK ON SALESREP, C.CUSTNUM, R.ORDERNUM;
S> LIST N 18;
The break groups for this report are:
Sales representatives form the major break group.
The customers of each sales representative form the next level break group.
The orders from each customer form the last break group.
A title and footing can be printed at each level. Figure 4-6 shows the resulting report.
When you use the BREAK ON command, consider these points:
You can specify only one BREAK ON command at a time. You can edit the
command by using FC, replace the command by reentering it, delete the command
by entering RESET REPORT BREAK ON, or modify the BREAK ON command by
using RESET REPORT BREAK ( column-list).
The BREAK ON command must define the break groups at all levels. Specify the
groups and subgroups from most inclusive to least inclusive.
You should include an ORDER BY clause in the associated SELECT command to
sort the break columns.
Figure 4-6. Break Groups
SREP CUSTNUM ORDERNUM PARTNUM UNIT_PRICE QTY_ORDERED
2402
220 324 500450 212
2002
2001
255
8
12
16
16
48
2500.00
3900.00
1100.00
330.00
1500.00
6301
6500
1234
7777
100210
100250
244
2001
2403
5100
244
5103
3
3
6
10
4
10
15
1095.00
245.00
400.00
3500.00
150.00
620.00
1100.00
3500.00
221
222
5635
926
101220
200300
255
5103
7102
7301
244
10
3
7
8
8
425.00
275.00
400.00
3900.00
3500.00
VST0406.vsd