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

Introduction to the NonStop SQL/MP Report Writer
HP NonStop SQL/MP Report Writer Guide—527213-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