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-6
Defining the Layout
The report in Figure 4-3 illustrates features related to page breaks and page
numbering. The horizontal lines indicate where the page breaks occur.
The following command selects the data for the report:
>> SELECT *
+> FROM PERSNL.EMPLOYEE E, PERSNL.DEPT
+> WHERE E.DEPTNUM = DEPT.DEPTNUM
+> ORDER BY E.DEPTNUM, JOBCODE DESC ;
The following commands define the report:
S> DETAIL JOBCODE,
+> EMPNUM,
+> CONCAT (LAST_NAME STRIP, ", ", FIRST_NAME)
+> AS A25 NOHEAD,
+> SALARY;
S> BREAK ON E.DEPTNUM, JOBCODE;
S> BREAK FOOTING E.DEPTNUM (PAGE) ;
S> PAGE TITLE "Department: ", DEPTNAME ;
S> PAGE FOOTING "Location ", LOCATION, TAB 50,
+> "Page - ", PAGE_NUMBER AS I2;
S> SET LAYOUT PAGE_LENGTH 15;
Figure 4-3. Example of Pagination Features
JOBCODE EMPNUM SALARY
Department : FINANCE
900
500
100
208
202
210
214
23
CRAMER, SUE
CLARK, LARRY
BARTON, RICHARD
KELLY, JULIA
HOWARD, JERRY
Location CHICAGO Page - 1
Department : INVENTORY
JOBCODE EMPNUM SALARY
321
219
233
230
32
WINN, BILL
TERRY, DAVID
MCDONALD, TED
LEWIS, ROCKY
RUDOLF, THOMAS
900
250
100
200
19000.00
25000.75
29000.00
50000.00
137000.10
32000.00
27000.12
29000.00
24000.00
138000.40
Location LOS ANGELES Page - 2
Department : . . .
.
.
.
.
.
.
VST0403.vsd