To use Cognos product documentation, you must enable JavaScript in your browser.

Create and Modify Classes

Create your own classes or modify existing classes in a report to format objects across a report according to your particular needs. In Report Studio, objects in reports are assigned a Cascading Style Sheet (CSS) class that provides a default style for the object. For example, when you create a new report, the report title has the class property Report title text assigned to it. In addition, objects inherit the classes set on their parent objects.

You can use classes to highlight data using conditional styles .

Classes you create or modify can be applied only to the current report. To create or modify classes for all reports, you must modify a layout style sheet. In addition, some classes can be used to format Query Studio reports.

Steps
  1. From the File menu, click Report Properties.

  2. Click Report styles and select one of the following options:

  3. Pause the pointer over the page explorer button  and click Classes.

  4. To create a new class, in the Insertable Objects pane, drag Class to the Local Classes pane.

  5. To modify an existing class, in the Local Classes or Global Class Extensions pane, click the class that you want.

    Modify a global class to apply a change to all objects that use that class. For example, if you modified the style List column title cell, all column titles in lists will reflect your modifications.

    Tip: Ctrl+click classes to make the same change to more than one class.

  6. In the Properties pane, modify the properties to specify your desired formatting.

    Tip: Look at the Preview pane to preview your changes for different report objects, such as blocks, table cells, and text items.

    If you modify a global class, a pencil symbol appears beside the global class icon to indicate that the class was modified.

  7. Apply the class to the objects you want:

Modify Classes to Format Query Studio Reports

Some global classes are specific to Query Studio or can be applied to Query Studio reports. You can modify the following classes to format Query Studio reports.

Class

Description

List column body cell

Style used to format list data.

List column title cell

Style used to format list column headings.

Steps
  1. Create a Query Studio template .

  2. Modify the global classes that you want.

  3. Save the template.

To format a Query Studio report using the modified classes, the template must be applied to the report. For more information about applying a template to a Query Studio report, see the Query Studio User Guide.

Modifying the Default Layout Style Sheet

In addition to creating or modifying classes in a report, you can create and modify classes that will apply to all reports. Default styles are stored in a style sheet named GlobalReportStyles.css. For information about modifying the style sheet, see the Administration and Security Guide.