NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
D-47
Considerations—DETAIL
Considerations—DETAIL
Default detail line
The detail line for the default report is:
DETAIL COL 1, COL 2, COL 3, ... ;
A DETAIL command with no print list (DETAIL;) produces a report that has no
detail lines. This can be useful for summary reports.
Each DETAIL command replaces the previous DETAIL command
Only one DETAIL command is in effect at a time. You can use the FC command to
modify the current DETAIL command, or you can use the RESET REPORT
command to reset the DETAIL line to the default.
Print list limited to 4072 bytes of printed output
The output of the print list you specify in a DETAIL command is a logical line, even
though (depending on margin settings, device widths, and use of the SKIP clause) it
might print on more than one physical line. A logical line is limited to 4072 bytes,
including the field widths of all print items and the number of spaces between items.
Creating summary reports
To create a report that includes only information about groups of records, use the
BREAK ON command to specify groups, use the BREAK TITLE and BREAK
FOOTING commands to specify the contents of the report lines, and use a DETAIL
command with no arguments (DETAIL;) to suppress printing of detail lines. Only
the summary lines will print.
Determining headings
The report writer goes through the following steps to determine the heading to use
for a print item:
1. Check the HEADINGS style option. If OFF, do not generate headings; if ON,
continue.
2. Check whether there is a DETAIL command for the current report that includes
NOHEAD or HEADING clauses. If so, generate headings accordingly; if not,
continue.
3. Check for the most recent alias or detail alias. If an alias exists, use the alias as
the heading; if not, continue.
4. Check whether the table or view column has a heading defined for it. If so, use
the heading; if not, use the column name as the heading.
5. Generate a default (EXPR) heading for each expression, function, or numeric
literal unless a heading was specified for the item in a DETAIL command.
6. Omit headings for string literals and IF/THEN/ELSE or CONCAT items unless
headings were specified for them in the DETAIL command.