- IBM Cognos 8 Report Studio Cookbook
- Abhishek Sanghani
- 396字
- 2021-08-06 17:15:48
New conditional styling with v8.3 onwards
In this recipe, you will learn about the new conditional styles property introduced in Report Studio which, in my humble opinion, is the best feature added to make a report author's life less tedious.
Assume that the following report needs to be formatted such that quantities below 1.7M will be highlighted with red background and those above 2M should be green. Also, we need the negative values for Running Difference (month-on-month) to be shown in red and in a bracket.

As shown in previous recipe, this would have needed us to define two conditional variables. Then attach each to the corresponding column as 'Style variable' to define the styles. With one more such numeric column, the author had to define one more variable and repeat the exercise. Let's see how the new conditional styling feature solves this problem.
Getting ready
Write a new report similar to the one shown in the previous screenshot. Use Report Studio version 8.3 or later.
How to do it...
- Select the Quantity column on report page.
- Open the new Conditional Styles dialog from Properties pane.
Alternatively, you can also click on the Conditional Styles button
from the toolbar.
- Create a New Conditional Style.
- Choose quantity to base the conditions on.
- Define three values (0, 1.7 million and 2 million) by hitting the new value button on bottom left corner. This will look like the following:
Also choose corresponding styles for each range as shown in the screenshot. Give appropriate name, like Quantity colors in this case.
- Similarly, define the negative values for Running Difference column to be shown in red.
- Run the report to test it.

How it works...
With this new feature, we can now define styling for any column without explicitly defining the conditional variable. The styling can be based on the values on the column itself (8.3 onwards) or some other column (8.4 onwards).
Also, defining actual formatting (font, color, border, and so on) for different conditions is now done within one dialog box. This is more author-friendly than traversing through the conditional variable pane and choosing each condition.
There's more...
The previous example defines very basic value-based range or classification.
You can also choose 'Advanced Conditional Style' option under this property, which allows you to define an expression and have better control over conditions than just classifying the values into ranges.
- Microsoft BizTalk Server 2010 Patterns
- 中文版Photoshop CS6平面設計實例教程(第2版)
- Ogre 3D 1.7 Beginner's Guide
- ASP.NET jQuery Cookbook
- Excel公式、函數與圖表案例實戰從入門到精通(視頻自學版)
- SPSS統計分析
- Building Websites with PHP/Nuke
- Photoshop CS6案例教程(第3版)
- Indesign平面排版技術應用
- 網店美工設計:Photoshop CC案例教程(視頻指導版)
- 好學、好用、好玩的Photoshop 寫給初學者的入門書(第4版)
- RAW 數碼底片演義
- Altium Designer 21 PCB設計官方指南(高級實戰)
- Photoshop CC設計與應用任務教程
- Photoshop CS6圖像處理立體化教程