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

Using SQLCI and the Report Writer
HP NonStop SQL/MP Report Writer Guide—527213-001
2-7
Setting Up Your Session Environment
Defining a Window for Report Output
If your report is wider than the maximum width of the device on which you are
displaying or printing it, you can use the SET LAYOUT WINDOW command to specify
which vertical portion of the report you want to see. For example, suppose a report is
designed for a printer that prints 120 single-byte characters per line. The margins are
set and the SELECT command select list is specified as follows:
>> SET LAYOUT LEFT_MARGIN 8;
>> SET LAYOUT RIGHT_MARGIN 120;
>> SELECT D.DEPTNUM, DEPTNAME, MANAGER, LOCATION, EMPNUM,
+> FIRST_NAME, LAST_NAME, JOBCODE
.
.
+> ... ;
The report is produced in the default format.
If you want to display the report on your terminal, the text that does not fit within the
device width is wrapped to the next line by default. For example, the headings and first
detail line appear as follows:
As you can see, the report is difficult to read in this arrangement. If you want to see the
report as it would appear on the printer without the wrapped lines, set the WRAP
session option to OFF and use the SET LAYOUT WINDOW command to view different
parts of the report:
To make the EMPNUM column appear at the left edge of the output, enter WINDOW
EMPNUM as shown in Figure 2-6:
Figure 2-4. Defining a Window for Report Output
Figure 2-5. Defining a Window for Report Output
VST0204.vsd
MANAGER LOCATIONDEPTNAMEDEPTNUM
LAST_NAME
JOBCODEEMPNUM FIRST_NAME
1000
FINANCE
23 CHICAGO 100GREEN1 ROGER
1000 FINANCE 23 CHICAGO
VST0205.vsd
1 ROGER
S> SET WRAP OFF;
S> LIST FIRST 1;
MANAGER LOCATIONDEPTNAMEDEPTNUM EMPNUM FIRST_NAME
S>