How to: |
Reference: |
You can make a detailed tabular report easier to read by separating sections with blank lines or underlines.
You cannot add blank lines or underlines to an HTML report that displays a grid. You can add blank lines or underlines if you set the GRID attribute to OFF.
When inserting blank lines, the setting of the LINES parameter should be at least one less than the setting of the PAPER parameter to allow room for blanks after the display of data on a page.
A Financial Modeling Language (FML) report with columns of numbers includes, by default, an underline before a RECAP calculation for readability. In these types of reports, you can change the default underline from light to heavy (or single to double in a PDF report).
Feature |
Description |
Applies to |
---|---|---|
SKIP-LINE* |
Adds a blank line. |
HTML (requires GRID=OFF) DHTML PS XLSX EXL2K |
TYPE=SKIPLINE |
Formats a blank line. |
DHTML PS |
UNDER-LINE* |
Underlines a sort group. |
HTML (requires GRID=OFF) DHTML PS |
TYPE=UNDERLINE |
Formats an underline. |
DHTML PS |
STYLE={+|-}UNDERLINE* |
Adds an underline to a report component, or removes an underline from a report component other than a column title. |
HTML DHTML PS XLSX EXL2K |
STYLE={+|-} EXTUNDERLINE* |
Extends the underline to or removes the underline from the entire report column in a styled report. |
DHTML PS PPT PPTX |
BAR AS '{-|=}'* |
Selects a single or double underline in an FML report. For HTML, selects a light or heavy underline in an FML report. |
HTML DHTML PS XLSX EXL2K |
* Not supported with border.
Use only one SKIP-LINE per report request.
display_command fieldname SKIP-LINE
or
{ON|BY} fieldname SKIP-LINE [WHEN expression;]
where:
Is a display command.
Is the display or sort field after which a blank line is inserted.
SKIP-LINE used with a display field adds a blank line after every displayed line, in effect, double-spacing a report. Double-spacing is helpful when a report is reviewed, making it easy for the reader to write comments next to individual lines.
SKIP-LINE used with a sort field adds a blank line before every change in the value of that field. This is one of the only ON conditions that does not have to refer solely to a sort (BY) field.
Is a vertical sort phrase. The terms are synonymous.
Specifies conditional blank lines in the display of a report as determined by a logical expression. See Using Expressions for details on expressions.
This request inserts a blank line before every change in value of the sort field EMP_ID.
DEFINE FILE EMPLOYEE INCREASE/D8.2M = .05*CURR_SAL; CURR_SAL/D8.2M=CURR_SAL; NEWSAL/D8.2M=CURR_SAL + INCREASE; END TABLE FILE EMPLOYEE PRINT CURR_SAL OVER INCREASE OVER NEWSAL BY LOWEST 4 EMP_ID BY LAST_NAME BY FIRST_NAME ON EMP_ID SKIP-LINE ON TABLE SET PAGE-NUM OFF ON TABLE SET ONLINE-FMT PDF END
The data for each employee stands out and is easy to read:
TYPE=SKIPLINE, attribute=value, $
where:
Is a valid StyleSheet attribute.
Is the value of the attribute.
Note: This option is supported for PDF, PS, and HTML reports (when used in conjunction with internal cascading style sheets).
In this request, blank lines are formatted to display as silver in the output. The relevant StyleSheet declaration is highlighted in the request.
SET ONLINE-FMT=PDF TABLE FILE CENTINV HEADING "Low Stock Report" " " SUM QTY_IN_STOCK WHERE QTY_IN_STOCK LT 5000 BY PRODNAME ON PRODNAME SKIP-LINE ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLE * TYPE=SKIPLINE, BACKCOLOR=SILVER, $ ENDSTYLE END
The report is:
{ON|BY} fieldname UNDER-LINE [WHEN expression;]
where:
Is a vertical sort phrase. The terms are synonymous.
Is the sort field to which the underline applies. UNDER-LINE adds an underline when the value of the sort field changes. An underline automatically displays after options such as RECAP or SUB-TOTAL but displays before page breaks.
Specifies conditional underlines in the display of a report as determined by a logical expression. See Using Expressions for details on expressions.
This request adds an underline when the value of the sort field BANK_NAME changes. It sets the GRID attribute to OFF, as required by an HTML report.
TABLE FILE EMPLOYEE PRINT EMP_ID AND BANK_ACCT AND LAST_NAME BY BANK_NAME ON BANK_NAME UNDER-LINE ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF, $ ENDSTYLE END
The data for each bank stands out and is easy to read:
TYPE=UNDERLINE ... COLOR={color|RGB} (r g b), $
where:
Denotes underlines generated by ON fieldname UNDER-LINE.
Specifies the color of the underline. If the display or output device does not support colors, it substitutes shades of gray. The default value is black.
Is one of the supported color values. For a list of supported values, see Color Values in a Report.
Specifies the text color using a mixture of red, green, and blue.
Is the desired intensity of red, green, and blue, respectively. The values are on a scale of 0 to 255, where 0 is the least intense and 255 is the most intense.
Note that using the three-color components in equal intensities results in shades of gray.
Note: This option is supported for PDF, PS, and HTML reports (when used in conjunction with internal cascading style sheets).
This request uses UNDERLINE to change the default color of an underline from black to red.
SET ONLINE-FMT = PDF TABLE FILE GGSALES SUM UNITS DOLLARS BY CATEGORY BY PRODUCT HEADING "Sales Report" " " ON CATEGORY UNDER-LINE ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLE * TYPE=UNDERLINE, COLOR=RED, $ ENDSTYLE END
The result is an eye-catching separation between sort group values. The online PDF report is:
TYPE=type, [subtype,] STYLE=[+|-]UNDERLINE, $
where:
Is the report component. For valid values, see Identifying a Report Component in a WebFOCUS StyleSheet.
Are additional attributes, such as COLUMN, ACROSS, or ITEM, needed to identify the report component. For valid values, see Identifying a Report Component in a WebFOCUS StyleSheet.
Adds an underline to the inherited text style or specifies a combination of text styles (for example, STYLE=BOLD+UNDERLINE). This is the default value.
Removes an underline from an inherited text style.
This syntax applies to an HTML report with internal cascading style sheet.
TYPE=TITLE, [COLUMN=column,] STYLE=-UNDERLINE, $
where:
Specifies a column. For valid values, see Identifying a Report Component in a WebFOCUS StyleSheet.
This request adds underlines to the values of the column CATEGORY and removes the default underlines from the column titles in an HTML report with internal cascading style sheet.
SET HTMLCSS = ON TABLE FILE MOVIES PRINT TITLE DIRECTOR BY CATEGORY ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF, $ TYPE=TITLE, STYLE=-UNDERLINE, $ TYPE=REPORT, COLUMN=CATEGORY, STYLE=UNDERLINE, $ ENDSTYLE END
The partial report is:
By default, underlines for column titles on a report extend only from the beginning to the end of the column title text. You can extend the underline to the entire report column in styled report output using the EXTUNDERLINE option in your WebFOCUS StyleSheet. EXTUNDERLINE is an option of the STYLE attribute for the TITLE report component. It is supported for formats DHTML, PDF, PS, PPT, and PPTX.
TYPE = TITLE, [COLUMN = colspec,] STYLE = [+|-]EXTUNDERLINE ,$
where:
Is any valid column specification.
Adds the EXTUNDERLINE option to the inherited text style or specifies a combination of text styles (for example, STYLE=BOLD+UNDERLINE).
Removes the EXTUNDERLINE option from the inherited text style.
The following request against the GGSALES data source sums dollar sales by city and by date:
DEFINE FILE GGSALES YEAR/YY = DATE; MONTH/M = DATE; END TABLE FILE GGSALES SUM DOLLARS AS 'Sales' BY DATE BY CITY WHERE YEAR EQ 1997 WHERE MONTH FROM 01 TO 05 WHERE CITY EQ 'Seattle' OR 'San Francisco' OR 'Los Angeles' ON TABLE SET PAGE NOPAGE ON TABLE PCHOLD FORMAT DHTML END
The output shows that only the column titles are underlined:
To underline entire columns, generate the output in a format that can be styled and use the EXTUNDERLINE option in the STYLE attribute for the TITLE component. For example, the following request creates DHTML output in which the column titles are in boldface and left justified, and the underline is extended to the entire report column:
DEFINE FILE GGSALES YEAR/YY = DATE; MONTH/M = DATE; END TABLE FILE GGSALES SUM DOLLARS AS 'Sales' BY DATE BY CITY WHERE YEAR EQ 1997 WHERE MONTH FROM 01 TO 05 WHERE CITY EQ 'Seattle' OR 'San Francisco' OR 'Los Angeles' ON TABLE SET PAGE NOPAGE ON TABLE PCHOLD FORMAT DHTML ON TABLE SET STYLE * TYPE=TITLE, STYLE= BOLD +EXTUNDERLINE, JUSTIFY=LEFT, $ ENDSTYLE END
The output is:
The following version of the request makes the EXTUNDERLINE and JUSTIFY=LEFT options the default for the TITLE component, then makes the Date column title bold and removes the extended underline from that column:
DEFINE FILE GGSALES YEAR/YY = DATE; MONTH/M = DATE; END TABLE FILE GGSALES SUM DOLLARS AS 'Sales' BY DATE BY CITY WHERE YEAR EQ 1997 WHERE MONTH FROM 01 TO 05 WHERE CITY EQ 'Seattle' OR 'San Francisco' OR 'Los Angeles' ON TABLE SET PAGE NOPAGE ON TABLE PCHOLD FORMAT DHTML ON TABLE SET STYLE * TYPE=TITLE,STYLE= EXTUNDERLINE, JUSTIFY=LEFT ,$ TYPE=TITLE,COLUMN= DATE, STYLE= -EXTUNDERLINE +BOLD ,$ ENDSTYLE END
The output is:
This syntax applies to an HTML report.
BAR [AS '{-|=}'] OVER
where:
Generates a light underline. Enclose the hyphen in single quotation marks. This is the default value.
Generates a heavy underline. Enclose the equal sign in single quotation marks.
This request changes the default light underline to a heavy underline in an FML report.
TABLE FILE LEDGER SUM AMOUNT FOR ACCOUNT 1010 AS 'CASH ON HAND' OVER 1020 AS 'DEMAND DEPOSITS' OVER 1030 AS 'TIME DEPOSITS' OVER BAR AS '=' OVER RECAP TOTCASH = R1 + R2 + R3; ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF, $ ENDSTYLE END
A heavy underline separates total cash from the detail data, making it stand out:
This request changes the default single underline in a PDF report to a double underline.
TABLE FILE LEDGER SUM AMOUNT FOR ACCOUNT 1010 AS 'CASH ON HAND' OVER 1020 AS 'DEMAND DEPOSITS' OVER 1030 AS 'TIME DEPOSITS' OVER BAR AS '=' OVER RECAP TOTCASH = R1 + R2 + R3; ON TABLE SET ONLINE-FMT PDF ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF, $ ENDSTYLE END
The output is: