The purpose of this document is to outline the steps required to create a template for use within IBM Cognos Query Studio.
The steps outlined in this document were validated using IBM Cognos BI version 10.2 using the GO Sales(Query) package provided with the samples.
Although IBM Cognos Query Studio has some ability to customize the layout of an existing report, the customizations are limited to what is available within the current IBM Cognos Query Studio User Interface (UI) and need to be applied on a per report basis.
The following section provides the step by step instructions on how to create and apply a template which will apply a report background color and remove the title header of a report.
Creating the Report Template
- Launch IBM Query Studio using the GO Sales(Query) sample package.
- Within the top left Menu pane, click on the Manage File link to display the Manage File menu.
- Within the Manage File menu, click on the Open in Report Studio link as shown in Fig 1.
Fig 1: IBM Query Studio Manage File Menu displaying the Open in Report Studio link
- Within the newly opened IBM Cognos Report Studio browser session, select the report area.
- From the toolbar, select the drop down for background color. As shown in Fig 2, an array of Web Safe Colors that can be chosen after selecting the background color toolbar icon will be displayed. Select the desired color.
Fig 2: Web Safe Colors that are available for the report background
- Select the title area and right click. From the available menu options listed select the Delete option to remove the title section from the report.
- As shown in Fig 3, navigate to the File menu and select Convert to Template. The report area on the right hand side has no title and a new background color applied (yellow in this case).
Fig 3: Convert to Template File menu option and the report area with no title and a new background color
- Save the template using the Save option from the File menu and exit IBM Cognos Report Studio.
Applying Template within IBM Cognos Query Studio
- Launch IBM Cognos Query Studio using the GO Sales(query) package.
- As shown in Fig 4, navigate to the My Preferences... option under
Manage File within the top left menu pane to apply the template created previously within IBM Cognos Report Studio Within the right hand pane, all the changeable preferences are listed, including the ability to apply a default template.
Fig 4: My Preferences option to select the default template
- Click the Select a template... link and navigate to the folder location of the saved template. Select the template and then click the OK button.
- After selecting a template, and still within the My Preferences options pane, ensure the Apply a template checkbox is checked (Fig 5). Notice that a default template has been selected displaying its name and location. In this example the template name is RS Template and it is located in the user’s My Folders.
Fig 5: Apply a template to the IBM Cognos Query Studio Reports through My Preferences
Testing the Template
- From the toolbar, select New Report to create a new IBM Cognos Query Studio report using the newly defined default template.
- Insert some data items such as Product line and Product type to the report area in the report. Fig 6 shows a List report object with two columns named Product line and Product type, a background color of yellow and the default title area has been removed as defined in the template.
Fig 6: Template applied to the report
- To test the removal of the title header, select the Product line column and click Filter icon on the toolbar.
- Select few items such as Camping Equipment and Golf Equipment from the picklist and then click the OK button. When the report refreshes the List object will only display the Camping Equipment and Golf Equipment as expected. Due to the removal of the title header by the template, the header does not display a filter icon or the supporting text of Product line in (Camping Equipment, Golf Equipment).
Dig deeper into Big data and analytics on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Crazy about Big data and analytics? Sign up for our monthly newsletter and the latest Big data and analytics news.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.