SQL/MP Report Writer Guide

Customizing a Report
HP NonStop SQL/MP Report Writer Guide527213-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