COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Chandrasekar on 19 Sep 2014 04:09:57 AM

Title: Conditional block for multi-selection prompt
Post by: Chandrasekar on 19 Sep 2014 04:09:57 AM
Hi Guru's,

I have the scenario for  multi-selection prompt with conditional blocks in Cognos 10.2. Prompt fields are List report and crosstab report.

If i click list  report displays list report, If i click crosstab report displays crosstab report using boolean variable, Its works fine. When i am select both list and crosstab options its not work.
Please can you help me?

Thanks & Regards,
Chandrasekar.
Title: Re: Conditional block for multi-selection prompt
Post by: Francis aka khayman on 19 Sep 2014 04:20:29 AM
if you use boolean variable, you have to create a NOT condition as boolean variables only works on TRUE conditions.

you can instead use string variable with values: list, crosstab and both
Title: Re: Conditional block for multi-selection prompt
Post by: PRIT AMRIT on 19 Sep 2014 04:36:12 AM
Step-1 Instead of multi-select add another static values, List, Crosstab, All.
Step-2 Create a string varibale using your prompt parameter
Step-3 Associate the string varible to your conditonal block
Step-4 Based on the value you can asign type of reprots
Step-5 Make your prompt auto-submit

Hope it works.

Br,
Prit

Title: Re: Conditional block for multi-selection prompt
Post by: Chandrasekar on 19 Sep 2014 05:12:30 AM
Hi khayman,

So not possible to create multi-selections from boolean variable. Its correct.

Thanks & Regards,
Chandrasekar.
Title: Re: Conditional block for multi-selection prompt
Post by: Chandrasekar on 19 Sep 2014 05:20:16 AM
Hi Prit,

I checked already it works this way. In multi-selection list and crosstab both selected. In this situation boolean variable is possible? If possible, how to do that?

Thanks & Regards,
Chandrasekar.
Title: Re: Conditional block for multi-selection prompt
Post by: Lynn on 30 Sep 2014 04:50:40 AM
Others have provided good options to pursue, but I'd add that you could create two boolean variables. One for the list and one for the crosstab. Leave your prompt as multi-select with a choice for list and a choice for crosstab. Then in your list Boolean say something like:


ParamValue('YourParam') contains 'list'


Do the same for your crosstab Boolean variable except specify crosstab instead. The "contains" operator will allow each variable to render true if the specified item is selected or if both are selected.
Title: Re: Conditional block for multi-selection prompt
Post by: HalfBloodPrince on 30 Sep 2014 06:51:01 AM
try this

create one string variable with below code

if(ParamDisplayValue('Parameter1')='List') then

('List')

else
if (ParamDisplayValue('Parameter1')='Crosstab') then

('Crosstab')

else
('Both')

then while setting render varible for list select List and both , for Crosstab select Crosstab and both.
Title: Re: Conditional block for multi-selection prompt
Post by: Chandrasekar on 30 Sep 2014 07:37:03 AM
Hi HalfBloodPrince,

Thanks for your reply, I think it possible in single selection value prompt. Am i correct.

Thanks & regards,
Chandrasekar.
Title: Re: Conditional block for multi-selection prompt
Post by: Chandrasekar on 30 Sep 2014 08:29:28 AM
Hi Lynn,

Thank you very much for your reply. It works fine.

Thanks & Regards,
Chandrasekar.