A Brief on Conditional Block in Cognos 10 Report Studio

The purpose of this article is to introduce you to conditional blocks, a very useful and powerful Report Studio function. Here, you'll learn everything you need to know about Conditional Block in Cognos 10 Report Studio from the basic to the advanced.

Conditional Block in Cognos

Conditional blocks show different display results based on user interaction or parameters read in when a Report is run. They provide a creative method for presenting either the same report data in various formats or executing several completely different reports from one prompt page.


Learn how to use Cognos, from beginner basics to advanced techniques, with online video tutorials taught by industry experts. Enroll for Free IBM Cognos Course Demo!


  • It is a process of blocking the layouts based on a given condition

  • Create a list report with the following query items

  • Product line

  • Product type

  • Product name

  • Quantity

  • Revenue

  • From toolbox drag crosstab object drop and below the list report

  • From toolbox drag the chart object drop below the crosstab

  • In Crosstab Report

  • Drop order year on rows

  • Order month on columns

  • Quantity on measure zone

  • In Chart Report

  • Drop Product line in X-Axis

  • Order method in Series

  • Revenue in Measure

Create a value prompt on Order year:

  • From page explorer

  • Select prompt pages

  • From insertable objects

  • Drag the page and drop in prompt page window

  • Double click on prompt page

  • From toolbox

  • Drag the value prompt object

  • Drop on prompt page

  • Next

  • From package item

  • Click on eclipses

  • Select the package item – Order year

  • Click on OK

  • Click on Next

  • Select Query1, Query2, Query3

  • Click on Next

  • Click on Finish

 MindMajix YouTube Channel

Create a string variable:

  • Define the following expression

  • Click on parameters

  • Drag parameter1

If (ParamDisplayvalue(‘Parameter1’))=‘2004’ THEN ‘A’ Else

If (ParamDisplayvalue(‘Parameter1’))=‘2005’ THEN ‘B’ Else

If (ParamDisplayvalue(‘Parameter1’))=‘2006’ THEN ‘C’

  • Validate OK

  • In the values window

  • Add A, B, C variables

  • From page explorer

  • Click on Page1

  • From toolbox

  • Drag the Conditional block object and drop at the bottom of the report

  • Select the conditional block

  • From properties pane

  • Select the block variable

  • Click on eclipses

  • Select string1 variable

  • Select A,B,C

  • Click on OK

  • From properties

  • Select Current Block

  • Properties

  • From Dropdown list box

  • Select A

  • Select any data item in the list report

  • From Ancestor

  • Click on List

  • Drag the List

  • Drop in the conditional block

  • Again select the conditional block

  • From properties pane

  • Select current block

  • Select B

  • Select data item in the crosstab ( Select only one item, not entire crosstab )

  • Drag the crosstab report

  • Drop in the conditional block

  • Again select conditional block

  • From properties pane

  • Select current block

  • Select C

  • Select data item in the chart report

  • Drag chart inside the conditional block

  • Save & run the report

Note: Scheduling can be onetime/recurring

Ex: Daily/Weekly

[Related Article: Cognos Interview Questions And Answers]


IBM Cognos report studio 1IBM Cognos Studio 2IBM Cognos studio 3IBM Cognos studio 4


IBM Cognos studio 5IBM Cognos studio 6IBM Cognos studio 7IBM Cognos studio 8IBM Cognos studio 9IBM Cognos studio 10IBM Cognos studio 11IBM Cognos studio 12

Explore Cognos Sample Resumes! Download & Edit, Get Noticed by Top Employers!Download Now!


Course Schedule
IBM Cognos TrainingJun 22 to Jul 07View Details
IBM Cognos TrainingJun 25 to Jul 10View Details
IBM Cognos TrainingJun 29 to Jul 14View Details
IBM Cognos TrainingJul 02 to Jul 17View Details
Last updated: 04 Apr 2023
About Author

Ravindra Savaram is a Technical Lead at Mindmajix.com. His passion lies in writing articles on the most popular IT platforms including Machine learning, DevOps, Data Science, Artificial Intelligence, RPA, Deep Learning, and so on. You can stay up to date on all these technologies by following him on LinkedIn and Twitter.

read less