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

Customizing a Report
HP NonStop SQL/MP Report Writer Guide—527213-001
4-11
Specifying the Items in a Detail Line
Specifying the Items in a Detail Line
In the default report format, the select list determines which print items appear in each
detail line of the report. This default detail line can be described in terms of the DETAIL
command as follows:
DETAIL COL 1, COL 2, COL 3,... ;
Each column number corresponds to the ordinal position of an item in the select list.
For example, the following select list has a default detail line of 5 items:
>> SELECT EMPNUM, LAST_NAME, FIRST_NAME, JOBCODE, SALARY
+> FROM PERSNL.EMPLOYEE
+> ORDER BY SALARY DESCENDING;
S> LIST NEXT 3;
EMPNUM LAST_NAME FIRST_NAME JOBCODE SALARY
------ ---------------- --------------- ------- -----------
1 GREEN ROGER 100 175500.00
32 RUDLOFF THOMAS 100 138000.40
23 HOWARD JERRY 100 137000.10
S>
You can refer to columns LAST_NAME and FIRST_NAME as COL 2 and COL 3.
S> DETAIL col 2, col 3;
Figure 4-5. Tabbing to a Display or Print Position
1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 . . .
1
23 54
Left Margin 8, First Output Position 9
Tab Position 35
Display Positions
Dept. No. 1000
Location : CHICAGO
1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 . . .
1
23 54
Print Positions
Dept. No. 1000
Location : CHICAGO
VST0405.vsd