FAQ About Using External Cascading Style Sheets

This topic answers the most frequently asked questions (FAQ) about using external Cascading Style Sheets (CSS) to format reports.

Does it answer your question? We invite you to send us any questions that you would like answered. Each question will get a response, and will also be considered for inclusion in a future release of FAQ. (We also invite your comments on anything in this document.)

You can:

How do I specify a report default formatting using CSS?

You can specify default formatting for an entire report in an external Cascading Style Sheet rule for the BODY or TD element. For more information, see Choosing a Cascading Style Sheet Rule.

Do I always need to use the CLASS attribute?

No. You need the CLASS attribute in a WebFOCUS StyleSheet if you specify formatting for an individual report component. (You use CLASS to assign a rule for a generic class to the report component.) When you specify formatting for the entire report, you do so in a rule for the BODY or TD element, not a rule for a class, so you omit the CLASS attribute.

If you place a reference to a CSS class in your stylesheet, it will be applied to the <A> tag as well as the <TD> tag. For example, if you have the class ".class1" in your external CSS, WebFOCUS would generate the following HTML for a value with a drilldown:

<TD CLASS='class1'>
<A class='class1' HREF="...">ENGLAND</A>
</TD>

For example, if you want red hyperlinks without underlines, issue:

SET CSSURL=http://myserver/mycss.css
TABLE FILE CAR
SUM SALES BY COUNTRY
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
type=data, column=country, focexec=fex1, class=class1, $
END

where mycss.css contains:

.class1 { color:red; text-decoration:none }

The output is:

For more information, see Applying External Cascading Style Sheet Formatting.

Can I use a Cascading Style Sheet and a WebFOCUS StyleSheet together?

When you link to an external Cascading Style Sheet, you can also specify native WebFOCUS StyleSheet attributes in a WebFOCUS StyleSheet. However, if you do not generate an internal Cascading Style Sheet, you should not specify CSS classes (CLASS=) and native WebFOCUS StyleSheet attributes in the same WebFOCUS StyleSheet (except to specify a condition for conditional formatting, to specify a link to another resource, and to embed an image). For more information, see Combining an External CSS With Other Formatting Methods. For information about internal Cascading Style Sheets, see Generating an Internal Cascading Style Sheet for HTML Reports.

Which version of CSS does WebFOCUS support?

Support for different versions of Cascading Style Sheets (such as CSS2) is determined entirely by your Web browser support and implementation of Cascading Style Sheets, not by WebFOCUS. Note that some Web browsers may not fully support the latest CSS version, or may implement a CSS feature in different ways. For more information, see Requirements for Using an External Cascading Style Sheet, and Troubleshooting External Cascading Style Sheets.

Can I use CSS to format reports generated as PDF, PostScript, or Excel 2000?

No, you can only use external Cascading Style Sheets to format reports that are generated as HTML.

Which types of reports can I format using an external Cascading Style Sheet?

You can format all types of reports using an external CSS:


WebFOCUS