Changing the global IBM Cognos style sheet
GlobalReportStyles.css is located in the following directories:
- c10_location/webcontent/schemas
The file in this location is used by IBM Cognos Viewer for HTML output.
- c10_location/reportstyles
The file in this location is used by Report Server for PDF and Excel outputs.
- c10_location/webcontent/reportstyles
The file in this location is used by Report Studio and Cognos Workspace Advanced.
The files in all directories must be modified to ensure that reports are rendered properly on both the server and the client systems. In a multiple server configuration, the style sheets on all systems must be modified. On the IBM Cognos server system, this is the file in the c10_location/reportstyles directory. On the web server systems, this is the file in the c10_location/webcontent/schemas directory. For example, if you have 2 IBM Cognos servers and 3 web servers, you must update 5 copies of the GlobalReportStyles.css file.
You can also add styles to this style sheet; however, a simpler alternative is to add a style to a template in Report Studio.
Any changes you make to this style sheet are lost if you reinstall or upgrade IBM Cognos software. If this happens, you must reapply your changes. For more information, see Migrating Changes to Future Releases.
Both Report Studio and Query Studio use the GlobalReportStyles.css file to assign classes to report objects. Query Studio does not expose these classes. However, you can use Report Studio or the Software Development Kit to modify the class property of any report object. For example, if you create a default report and then click the title, the class property appears as Report Title Text. You can change this property as required.
If you decide to modify the GlobalReportStyles.css file, you must be aware that the class names that appear in Report Studio are multilingual and defined in the Report Studio resource files. Instead of modifying this style sheet, it may be simpler to add a new style into your report.
For more information about creating or modifying class styles, see the IBM Cognos Report Studio User Guide.
When you work directly with an XML report specification, you can manually set the style of the object. For example, you can edit the report title, which may appear as follows:
<textItem class="reportTitleText">
<text>
My report title
</text>
</textItem>
For more information about modifying styles in a report specification, see the IBM Cognos Software Development Kit Developer Guide. For information about default report styles, see the IBM Cognos Report Studio User Guide.