Troubleshooting External Cascading Style Sheets

This topic will help you solve some common problems encountered when formatting reports with external cascading style sheets (CSS).

Which problems have you needed to troubleshoot? If you have troubleshooting suggestions that you think others will find helpful, we invite you to send them to us so that we can consider including them in a future release.

Symptom: The report does not reflect recent changes to the cascading style sheet.

  • Reason: When you run a report that references an external cascading style sheet, your web browser stores the CSS file in its memory or disk cache. When you later edit the CSS and run the report again, your browser may continue to use the earlier version of the CSS file that it had stored.

    Solution: Click your browser Refresh button (Microsoft Internet Explorer) to reload the CSS file from the web server. This ensures that your web browser will use the most current version of the cascading style sheet to format the report.

Symptom: The report is not using any of the cascading style sheet formatting.

  • Reason 1: You may have specified an incorrect URL when you attempted to link to the external cascading style sheet.

    Solution 1: Check the URL that specifies the link (in the CSSURL attribute or in the SET CSSURL command, or if the report procedure uses -HTMLFORM, in the LINK element) and correct it, if necessary.

  • Reason 2: Your web browser may not support cascading style sheets.

    Solution 2: All versions of Microsoft Internet Explorer that are certified for use with WebFOCUS support cascading style sheets. Check to be sure that your browser is certified. If it is not, install an appropriate version of Internet Explorer or Communicator.

  • Reason 3: Your web browser may be set to ignore cascading style sheets.

    Solution 3: Reset your browser to accept a document cascading style sheet. For instructions about checking or changing a browser setting, see the browser Help.

  • Reason 4: Some web browsers, if they do not support a single property specified in a rule, ignore the entire rule. If this is true of your web browser, and all of your report formatting is specified in a single rule (for example, a rule for TD or BODY), but the browser does not support one of the properties specified for the rule, none of the formatting will be applied to the report.

    Solution 4: Remove the unsupported property, or upgrade your browser to a version that supports the property.

  • Reason 5: Some web browsers implement CSS inheritance rules for nested elements in ways that do not conform to the CSS standard. If you are using such a browser, and for example, you specify all formatting in a rule for the BODY element, your browser may not apply the rule to other elements nested within BODY.

    Solution 5: Specify the report formatting in a rule for a different element (for example, if the browser does not correctly implement inheritance from BODY, use a rule for TD), or else upgrade your browser to a version that correctly supports inheritance.

  • Reason 6: The CSS file was not found on the server path when the report that references the .css file was run.

    Solution 6: Make sure the directory with the CSS file is on the server search path.

Symptom: The report reflects some, but not all, of the CSS formatting.

  • Reason 1: How a cascading style sheet rule formats your report is determined entirely by your web browser support and implementation of cascading style sheets, not by WebFOCUS. You may be experiencing this symptom because your browser does not support the level of cascading style sheets that you are using, leaving some CSS features unimplemented.

    Solution 1: Upgrade your browser to a version that supports all the CSS features used to format the report, or edit the cascading style sheet to remove features that are unsupported by some of the browsers that will be used to display the report.

  • Reason 2: Your web browser may be set to use your personal cascading style sheet, and some of the rules you had specified there may override rules specified in the cascading style sheet assigned to the report. For information about how conflicts between rules in different cascading style sheets are resolved, see your third-party CSS documentation.

    Solution 2: Reset your browser to accept the cascading style sheet for each document, or edit the rules in the two cascading style sheets so that they no longer conflict.

  • Reason 3: Some web browsers, if they do not support a property specified in a rule, ignore the entire rule. If this is true of your web browser, and the browser does not support one of the properties specified in the rule for one of the classes assigned to the report, none of the report components to which that rule has been assigned will be formatted.

    Solution 3: Remove the unsupported property, or upgrade your browser to a version that supports the property.

  • Reason 4: Each report component can be assigned only one cascading style sheet class. If you have specified more than one class, only the first one specified is assigned to the component; the others are ignored.

    If a class has not yet been assigned to a report cell, and you specify conditional formatting for it, only the first class whose condition is satisfied by that row is assigned to the cell. The others are ignored.

    Solution 4: Do not assign more than one CSS class to each report component. If you need to apply multiple attributes, bundle them into a single class.

  • Reason 5: Some web browsers implement CSS inheritance rules for nested elements in ways that do not conform to the CSS standard. If you are using such a browser, and for example, you specify some formatting in a rule for the BODY element, your browser may not apply the rule to other elements nested within BODY.

    Solution 5: Specify the report formatting in a rule for a different element (for example, if the browser does not correctly implement inheritance from BODY, use a rule for TD), or else upgrade your browser to a version that correctly supports inheritance.

  • Reason 6: External cascading style sheets can be subject to certain restrictions when used with other formatting methods. For example, if a WebFOCUS StyleSheet report does not generate an internal cascading style sheet, but it references external CSS classes and also specifies native WebFOCUS StyleSheet attributes, there may be a formatting conflict.

    Solution 6: The solution depends on the kind of formatting conflict. In the example above, the solution is to generate an internal cascading style sheet. For a complete description of which formatting methods are compatible with an external CSS, and how to avoid formatting conflicts, see Combining an External CSS With Other Formatting Methods.

Symptom: A report distributed with ReportCaster does not have the CSS styling, but it does have CSS styling when run interactively.

  • Reason: The mail server to which ReportCaster is distributing reports may not support externally referenced CSS files. For example, Gmail strips the CSS from HTML email, you must use an inline CSS for GMail.

    Solution: Issue the WebFOCUS command SET HTMLCSS=ON in your procedure, or issue the command ON TABLE SET HTMLCSS ON in your request. This creates reports with an inline CSS.