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



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

Answer / 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

More Cognos Interview Questions

what is the difference between native sql and cognos sql?

0 Answers  


Hi, I am Searching on Cognos 10, If any experienced person can send out a project or explain a realtime scenario that would be very helpful for me. Please be kind towards me and help me in this regard. I am really finding difficult to find a person who can guide me in this feild. Your help will be highly appriciated. My email id is asimcognos10@gmail.com. Hope you will help....

0 Answers  


i have a sales project interviewe asked tel me the how many facts&dimensions used in ur project.

2 Answers   IBM,


----------------Diff b/w Dimensional modeling and Relational modeling?

2 Answers   Cap Gemini, L&T,


how to improve performance in report studio level

1 Answers   Wipro,






In Report page i have three types like (List,Cross tab,Chart), using Conditional Block i need only type of Report (Chart)at run time.How to do this I need The Complete Steps to do this?

1 Answers  


how can you create a report like if country=india then true if contry=spain then false?

2 Answers   Syntel,


APPLYING COLORS TO ALTERNATE ROWS IN A LIST REPORT

5 Answers   Satyam,


Hi All, I have 1.6 years of experience in cognos in India. I always wanted to do a MS program to earn some money in US. But I think I am little late in taking the decision. As If I have to write my GRE it will be August or September of 2012 and will have to apply for fall 2013 as fall 2012 admissions are almost done now. So my concern is how will be my career do if my MS is at this stage,. i,.e. 3 years experience in Cognos and 2 years MS program in and again looking for job in U.S. Have I been too late in taking the call? I heard that MIS (Managing Information Systems) is having very good placements now. So guys, please advice me in taking the decision to have a good career and also in terms of earning money as I have few financial problems to solve (which I am hoping to solve when I get job in US after completion of my MS program). Thanks a lot friends. I really appreciate and thank one and all for their valuable comments in this site.

0 Answers  


Anybody sugest me either url address or website for cirtification in Cognos from cognos.com !

3 Answers  


What are the methods by which it non-durable model could be changed into the durable model?

0 Answers  


What do you understand by the term ‘frame manager' in cognos and write all the layers of the framework manager model?

0 Answers  


Categories