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
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
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:
CREATE A VALUE PROMPT ON ORDER YEAR:
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:
Name | Dates | |
---|---|---|
IBM Cognos Training | Dec 21 to Jan 05 | View Details |
IBM Cognos Training | Dec 24 to Jan 08 | View Details |
IBM Cognos Training | Dec 28 to Jan 12 | View Details |
IBM Cognos Training | Dec 31 to Jan 15 | View Details |
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.