WebFOCUS Online Help > Managed Reporting Developer > Working With Domains and Standard Reports > Applying Predefined Style Sheets to a Report
In this section: |
In Developer Studio, you can use the Report Painter to set styling options. For more information, see the Creating Reports With Graphical Tools manual. The remainder of this section applies to the browser, unless indicated otherwise.
In the browser, Report Assistant enables you to set various styling options to enhance the look of your report. From Report Assistant, you can set the styling for the font, font style, font size, text color, and text background color for the following report components:
You make your styling selections from one of Report Assistant's Style dialog boxes. You access a Style dialog box in one of the following ways:
Styles for Field |
From the Field Options dialog box, select a field and click Field. |
Styles for All Fields |
From the Field Options dialog box, click All Fields. |
Font (Conditional Styling) |
From the Conditional Styling dialog box, define a condition, then click Font. |
Report Style |
From the Report Options tab, click Report Style. |
Note: You can also style Headings and Footings from the Headings tab in Report Assistant. You can use the toolbar to set font properties and text and background color.
Each Style dialog box displays the customizable styling options you can set for that report component and the Style Example dialog box. The Style Example dialog box reflects the current style settings for the report component. As you make your styling selections, Report Assistant creates a style sheet that it applies to the report. A style sheet is a special set of instructions generated by Report Assistant to control the styling of the report.
You can select a predefined WebFOCUS StyleSheet or a Cascading Style Sheet from Report Assistant, instead of applying custom styling. A predefined StyleSheet or a Cascading Style Sheet is a style sheet that a WebFOCUS Administrator creates or imports and stores in a WebFOCUS domain's Other Files folder. Any user who then accesses Report Assistant from the domain can apply the style sheet to their report.
You apply a style sheet to a report from the Report Options tab in the Report Assistant. The following image shows the Global report styling section of the Report Options tab. This field contains the Font button, Active Report Styling button, and the drop-down list boxes Apply an existing WebFOCUS Style Sheet and Apply an existing Cascading Style Sheet.
To apply an existing style sheet to a report, select a style sheet from the drop-down list. The drop-down list includes all style sheet files stored in the domain.
If you apply a predefined style sheet to a report, Report Assistant disables all customizable styling options and does not apply any previous styling selections for the entire report. These settings are not lost. If you decide not to apply the predefined style sheet, Report Assistant restores the report's original styling settings and allows you to further customize a report's styling.
To make predefined style sheets available from Report Assistant, an Administrator must add one or more StyleSheet files (.sty) or Cascading Style Sheets (.css) to a domain's Other Files component. You add a style sheet file to this component in the following ways:
In the browser, Report Assistant lists the style sheet descriptions (not the actual file name) stored in the Other Files component in the predefined style sheet drop-down list.
The following is an example of the contents of a .css file located in the Other Files of a Managed Reporting domain. The .css file may be created using the editor or by importing it into Managed Reporting:
BODY {BACKGROUND-COLOR: BLUE;} TD {COLOR: YELLOW;}
Selecting Apply an existing Cascading Style Sheet for this .css file will generate the following syntax:
-* Created by Report Assistant -* FF Line do not change this line! Field Name -* FF Line do not change this line! Alias -* FF Line do not change this line! Format -* FF Line do not change this line! Segment -* FF Line do not change this line! Colno TABLE FILE CAR SUM COUNTRY RETAIL_COST CAR ON TABLE SET STYLE * CSSURL=app/bodyblue.css, $ ENDSTYLE END -* End Report Assistant
The following is an example of the contents of a WebFOCUS Style Sheet File (class.sty) located in the Other Files folder of a Managed Reporting domain. The class.sty file may be created using the editor or by importing it into Managed Reporting:
CSSURL=http://hostname[:port]/ibi_html/format.css ,$ TYPE=DATA, COLUMN=COUNTRY, CLASS=italcol ,$ TYPE=DATA, COLUMN=COUNTRY, SIZE=12, COLOR=YELLOW ,$
The format.css file contains the following format values:
BODY {BACKGROUND-COLOR: BLUE;} .columntitle {font-family: helvetica; font-weight: bold; color: blue;} .italcol {font-style: italic} .12pt {font-size: 12pt;} .bfield {font-weight: bold;}
When you or a user applies a predefined style sheet to a report, Report Assistant generates the following syntax and appends it to the report:
ON TABLE SET STYLE * -INCLUDE stylesheet.sty or stylesheet.css END
where:
Indicates the StyleSheet selected from the predefined WebFOCUS StyleSheet drop-down list.
Indicates the Style Sheet selected from the predefined Cascading Style Sheet drop-down list.
Before a user can apply a predefined style sheet to a report, a WebFOCUS Managed Reporting Administrator must add style sheet files to a domain's Other File component.
Report Assistant disables all customizable styling options.
WebFOCUS opens a new browser window displaying the report output. Close this window to return to Report Assistant.
As an Administrator, you have created the Corporate View Sales Commissions domain and added the Inventory Report Style, Sales Report Style, and the Purchasing Report Style StyleSheets to the Other Files component. As part of your company's report style guidelines, any user who creates an inventory, sales, or purchasing report must apply the associated StyleSheet to the report. Applying the appropriate StyleSheet ensures that reports of the same category have the same styling.
The following image shows the Corporate View Sales Commissions domain with the Other Files subfolder expanded containing these files, Inventory Report Style, Sales Report Style, and Purchasing Report Style.
A user that has access rights to the Sales domain, logs into WebFOCUS, opens the Sales domain, and switches to the Reporting Objects tab to create a sales report.
The following image shows the Standard Reports tab window opened containing the Sales domain with the Regional Wholesale Products folder expanded listing two reports, Eastern Sales and Western Sales.
The user selects the Sales reporting object and accesses Report Assistant. From Report Assistant, the user adds fields and a report heading. To style the report, the user must apply the Sales Report Style predefined StyleSheet. The user switches to the Report Options tab.
In the Global Report Styling area, the user clicks the Use a predefined WebFOCUS Style Sheet or Use a predefined Cascading Style Sheet check box and selects Sales Report Style from the StyleSheet drop-down list. Report Assistant disables all customizable styling options.
The drop-down list contains the same style sheet descriptions that you added to the domain's Other Files component.
When the user runs the report, WebFOCUS applies the predefined style sheet to the report and the output generated is consistent with your corporate standards.
WebFOCUS |