How to: |
To format a report using an external cascading style sheet (CSS), you must link to the cascading style sheet by assigning a file location using the CSSURL attribute or parameter:
When the CSSURL is specified in several ways, the most local specification takes precedence. The order of precedence, from local (1) to global (3), is:
1. TYPE=REPORT, CSSURL = url_or_fully-qualified pathname
2. ON TABLE SET CSSURL url_or_fully-qualified pathname
3. SET CSSURL = url_or_fully-qualified pathname
To link an external cascading style sheet (CSS) to a report using a SET parameter, issue the following command in a procedure:
SET CSSURL = css_url_or_fully-qualified pathname
or the following ON TABLE SET command in a report request:
ON TABLE SET CSSURL css_url_or_fully-qualified pathname
where:
Is the location of the external cascading style sheet (assume it is case-sensitive).
The length limit is:
This report displaying products offered by Gotham Grinds is formatted using an external cascading style sheet (CSS) that is linked through the CSSURL attribute in the FOCUS StyleSheet:
TABLE FILE GGPRODS
HEADING
"</1 Current Products</1"
PRINT PRODUCT_DESCRIPTION UNIT_PRICE
BY PRODUCT_ID
ON TABLE SET PAGE-NUM OFF
ON TABLE HOLD AS CSSEXAM3 FORMAT HTML
ON TABLE SET STYLESHEET *
TYPE=REPORT, CSSURL = c:\projects\report01.css, $
TYPE=HEADING, CLASS=headText, $
TYPE=TITLE, CLASS=reportTitles, $
TYPE=DATA, CLASS=lowCost, WHEN=N3 LT 27, $
ENDSTYLE
END
The output is:
Use the following syntax to link an external cascading style sheet (CSS) to your report using a FOCUS StyleSheet attribute:
[TYPE=REPORT,] CSSURL=css_path, $
where:
Specifies that this attribute is being applied to the entire report. If it is omitted, the StyleSheet declaration still defaults to this setting.
Specifies the URL or fully-qualified path name of the location where the external cascading style sheet definition file resides.
If you specify CSSURL multiple times, the last value specified in an ON TABLE SET command overrides all the other values within that report request. If CSSURL is not specified within a report request, the last value specified with SET overrides all the others.
Information Builders |