What is Conditional block? How do you use in a report?

Answer Posted / khushbu

Conditional block: Specify a variable based on which
objects inserted into a
block can be conditionally rendered.
for example user can have option for List report or chart
report when he runs the report.
Try this out........
CONDITIONAL BLOCKS
The goal of this report is to prompt users on which display
they would prefer, a list or a chart.
To start, create a simple list report in Report Studio.
Using the Cognos sample data, product line, order method
and revenue are added to the list. From the toolbox, drag
and place a pie chart below the list. Select the chart and
in the properties pane, attach this chart to query 1:




Now the chart can be populated from the data items tab.




The consumers of this report need the ability to choose
between the displays they want to see. To accomplish this,
build a blank prompt page allowing them to select from a
drop down list either list or chart. Drag a value prompt to
the prompt page with the following settings:



At this point hit ‘Finish”. The dropdown list has to be
populated manually though the static choices property of
the value prompt. The two choices added are list and chart.





*You can leave the display value blank. If you do so,
Report Studio is smart enough that it will take the use
value for the display value.
Now that my prompt page is set, return to the Report Page.
In order to conditionally display an object, use the
conditional blocks object in the toolbox. Drag this to the
bottom of the report.




The next step is to attach the variable to the conditional
blocks block variable property. This variable is a Boolean
variable that either equals a list or doesn’t.








We need to test if our parameter is equal to the
value ‘List’. If the user selected List this expression
will evaluate to true, if the user selected ‘Chart’ from
the prompt, then this will evaluate to false.
After this step is completed there is a new property on the
conditional blocks object that tell us which block we are
currently looking at. First, drag the chart into the ‘No’
block.





Now, select the conditional block again, and switch the
current block property to ‘Yes’. The conditional blocks
object appears empty because there is currently nothing in
the ‘Yes’ block.



The final step is to drag the entire list inside the ‘Yes’
block.



Now when the report is run, the user will be prompted for
their display of choice.

Is This Answer Correct ?    19 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is hints in cognos and where we use it.

2193


What do you understand by the term 'aggregate advisor?'

716


How we check the errors before running the report?

755


What is defined as Query studio?

797


How create measures and demensions?

802


my table having data like this year month revenue 2011 jan 100 2011 feb 200 2011 mar 150 like this i want My report 2011 jan 100 2011 feb 100+200=300 2011 mar 300+150=450 like this for this where we specify the condition how will specify? pls ans me pls...

3775


I have two queries in first query i have to show all values,in second query i have to show 3 values and want to hide 3 values what prompt ur going to use, why that prompt

2043


how can you get the errors in job? when loops are araised we get error?

1871


What is the difference between drill through, drill across?

786


Can you define bitmap index?

801


how to perform back drill through in cognos 8 what is the use of it

2250


how to develop dynamic dashboards, and what is the difference between static and dyanmic dashboards in report studion and need with example. plz mail me on this email id vasucognos4@gmail.com

3689


What is the difference between regular dimension and derminant?

1908


What do you understand by ‘ibm predictive maintenance and quality’?

750


Can you define confirmed dimension?

812