Conditional Block in Cognos 10 Report Studio

Recommended by 0 users

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.

  • It is a process of blocking the layouts based on 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

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 Drop down 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


conditional block in cognos














0 Responses on Conditional Block in Cognos 10 Report Studio"

Leave a Message

Your email address will not be published. Required fields are marked *

Copy Rights Reserved © Mindmajix.com All rights reserved. Disclaimer.
Course Adviser

Fill your details, course adviser will reach you.