Over-riding data formatting defined in database

In Cognos Report Studio, we can define the formatting of data items that we have seen in many recipes. However, sometimes, the formatting defined in the report does not take effect. In this recipe, we will consider one such scenario.

Getting ready

We will use the dimensional GO Sales SSAS Cube package for this.

Open the GOSALESDW cube in the SQL Server BIDS (Business Intelligence Development Studio) and change the data format of the Stmt Month measure as shown in the following screenshot:

Getting ready

Process the cube. Create a new crosstab report in Cognos Report Studio against the GO Sales SSAS Cube package.

How to do it...

  1. Drag Organization Code1 on to rows, Current Month on to columns and Stmt Month as the measure.
  2. Select the Stmt Month measure and define its data format to be Number and decimal points to 1.
    How to do it...
  3. Run the report to test it. You will notice that the formatting is not reflected in the output.
    How to do it...
  4. Now, go back to Cognos Report Studio. Select the measure and open the data format again.
  5. This time defines the pattern as shown in the following screenshot:
    How to do it...
  6. Run the report to test it. This time report will show numbers up to one decimal point only.

How it works...

As you saw in this recipe, from a glance it looks like the database formatting is taking precedence over the one defined in report studio. However, actually the formatting defined in the backend is a pattern. In order to correctly over-ride it, we need to define pattern in the report studio. Just over-riding the decimal points won't work.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset