SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
D-50
Considerations—DETAIL
number is an integer that corresponds to a print position between the left and right
margins. The default is 1.
You can tab backward (specify a print position earlier in the line than the current
print position), but if you overlap print items, the most recent item you specify
overwrites older ones (or portions of older ones).
Considerations—DETAIL
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.
Only one DETAIL command is in effect at a time. Use the FC command to modify
the current DETAIL command, or use the RESET REPORT command to reset the
DETAIL line to the default.
The output of the print list you specify in a DETAIL command is a logical line,
although (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.
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.
The report writer goes through these 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.