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-22
Using the Report Writer to Produce Text From Data
Figure 2-11. Example of Using the Report Writer to Produce Text From Data
?SECTION COLSTATS
SET LAYOUT PAGE_LENGTH ALL;
COLNAME
REPORT TITLE "-- DATE/TIME: ", CURRENT_TIMESTAMP AS DATE * TIME *,
"?SECTION COLUPD";
" SET UNIQUEENTRYCOUNT = ", CONCAT(COL 2, ","), SKIP 1,
CONCAT (" SECONDHIGHVALUE = '", COL 3, "',"), SKIP 1,
C.TABLENAME = T.TABLENAME AND TABLECODE NOT BETWEEN 500 AND 599;
SELECT C.TABLENAME, UNIQUEENTRYCOUNT, SECONDHIGHVALUE, SECONDLOWVALUE,
SET STYLE HEADINGS OFF;
SET LIST_COUNT 0;
DETAIL "UPDATE COLUMNS", SKIP 1,
FROM COLUMNS C, TABLES T
SKIP 1,
CONCAT (" SECONDLOWVALUE = '", COL 4, "'"), SKIP 1,
CONCAT (" WHERE TABLENAME = '", COL 1, "'"), SKIP 1,
CONCAT (" AND COLNAME = '", COL 5, "';");
LIST ALL;
WHERE C.TABLENAME LIKE ?TBOL AND
VST0211.vsd