Hurry! 20% Off Ends SoonRegister Now

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]

CONDITIONAL BLOCKING:

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

CREATE A VALUE PROMPT ON ORDER YEAR:

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!

 

Job Support Program

Online Work Support for your on-job roles.

jobservice

Our work-support plans provide precise options as per your project tasks. Whether you are a newbie or an experienced professional seeking assistance in completing project tasks, we are here with the following plans to meet your custom needs:

  • Pay Per Hour
  • Pay Per Week
  • Monthly
Learn MoreGet Job Support
Course Schedule
NameDates
IBM Cognos TrainingDec 24 to Jan 08View Details
IBM Cognos TrainingDec 28 to Jan 12View Details
IBM Cognos TrainingDec 31 to Jan 15View Details
IBM Cognos TrainingJan 04 to Jan 19View 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