SQL/MP Report Writer Guide

Introduction to the NonStop SQL/MP Report Writer
HP NonStop SQL/MP Report Writer Guide527213-001
1-8
Report Layout and Style
The report contains the following components:
1. Page title
2. Report title
3. Headings defined in the DETAIL command
4. Break title
5. Detail line
6. Subtotal line with a subtotal label, which is an asterisk (*)
Figure 1-3. A Sample Formatted Report
>> SET LIST_COUNT 0;
>> SET LAYOUT RIGHT_MARGIN 60;
>> SELECT P.PARTNUM, PARTDESC, PRICE, UNIT_PRICE,
+> QTY_ORDERED, ORDERNUM
+> FROM SALES.PARTS P, SALES.ODETAIL O
+> WHERE P.PARTNUM = O.PARTNUM
+> AND ( P.PARTNUM < 300 OR P.PARTNUM >= 6500 )
+> ORDER BY P.PARTNUM, ORDERNUM ;
S> DETAIL P.PARTNUM HEADING "Part No.",
+> UNIT_PRICE HEADING "Unit Price",
+> UNIT_PRICE*QTY_ORDERED AS F11.2
+> HEADING "Total Price" NAME TOTALP,
+> ORDERNUM HEADING "Order No.";
S> REPORT TITLE "Report Author and Version: Tom Jones, v. 2";
S> PAGE TITLE "Summary of Orders",
+> TAB 40, CURRENT_TIMESTAMP AS DATE *;
S> BREAK ON P.PARTNUM;
S> SUBTOTAL TOTALP;
S> BREAK TITLE P.PARTNUM (PARTDESC);
S> BREAK FOOTING P.PARTNUM (SKIP 1, "Suggested Price: ",
+> PRICE, SKIP 1);
S> TOTAL TOTALP;
S> PAGE FOOTING TAB 48, "Page", PAGE_NUMBER AS I3;
S> REPORT FOOTING "END OF SUMMARY" CENTER;
S> LIST ALL;
VST0105.vsd