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-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