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-7
Defining the Layout
The NEED clause is useful when you want to keep a set of lines together, such as a
complete address. In the next example, a page break will not occur in the middle of
information about a single supplier.
>> SELECT * FROM INVENT.SUPPLIER
+> ORDER BY SUPPNAME;
S> DETAIL NEED 4, "Supplier No.", SUPPNUM NOHEAD, SKIP 1,
+> SUPPNAME NOHEAD, SKIP 1,
+> STREET NOHEAD, SKIP 1,
+> CONCAT (CITY STRIP, ", ", STATE STRIP,
+> SPACE 1, POSTCODE) NOHEAD,
+> SKIP 1 ;
S> SET LAYOUT PAGE_LENGTH 14;
S> LIST FIRST 4;
Figure 4-4 shows the first 4 rows of output. The column of numbers on the right does
not appear in the report; the numbers indicate the 14 lines on each page. The third
detail line appears on the second page because only 3 more lines are available on the
first page.