SQL/MP Report Writer Guide

Introduction to the NonStop SQL/MP Report Writer
HP NonStop SQL/MP Report Writer Guide527213-001
1-5
Report Layout and Style
Default Report
You can display or print a report without specifying any report formatting commands,
layout options, or style options. The report is produced in the default format and is
called the default report. Figure 1-2 shows an example of a default report produced
with these commands:
>> VOLUME SALES;
>> SET LIST_COUNT 0;
>> SELECT P.PARTNUM, PARTDESC, QTY_ORDERED, ORDERNUM
+> FROM PARTS P, ODETAIL O
+> WHERE P.PARTNUM = O.PARTNUM
+> AND ( P.PARTNUM < 300
+> OR P.PARTNUM >= 6500 )
+> ORDER BY P.PARTNUM, ORDERNUM ;
S> LIST ALL;
The report contains a detail line for each row retrieved by the SELECT command. A
row must meet the criteria specified in the WHERE clause; the part number must be
less than 300 or greater than or equal to 6500.
The ORDER BY clause specifies that rows are arranged in ascending order by part
number and, for each part number, in ascending order by order number.
The WHERE clause also specifies that rows of the PARTS table are joined with rows of
the ODETAIL table when the rows have the same part number.
Figure 1-2. Example of Default Report Layout
PARTNUM
212
212
244
244
244
244
244
244
255
255
255
255
6500
6500
6500
7102
7102
7102
7301
7301
7301
7301
PARTDESC
PC SILVER, 20 MB
PC SILVER, 20 MB
PC GOLD, 30 MB
PC GOLD, 30 MB
PC GOLD, 30 MB
PC GOLD, 30 MB
PC GOLD, 30 MB
PC GOLD, 30 MB
PC DIAMOND, 60 MB
PC DIAMOND, 60 MB
PC DIAMOND, 60 MB
PC DIAMOND, 60 MB
DISK CONTROLLER
DISK CONTROLLER
DISK CONTROLLER
SMART MODEM, 1200
SMART MODEM, 1200
SMART MODEM, 1200
SMART MODEM, 2400
SMART MODEM, 2400
SMART MODEM, 2400
SMART MODEM, 2400
QTY_ORDERED
12
8
3
4
8
20
6
6
10
12
12
4
10
8
22
7
5
6
8
36
40
12
ORDERNUM
400410
500450
100210
100250
200300
300350
300380
800660
101220
400410
500450
700510
100250
700510
800660
101220
700510
800660
101220
400410
600480
800660
Default
Headings
Default Detail
Lines
VST0102.vsd