COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: mitwa on 17 Feb 2014 08:13:34 AM

Title: if i select list and crosstab then i have to get output of list and crosstab
Post by: mitwa on 17 Feb 2014 08:13:34 AM
assume that i have 3 items in an value prompt(with multi-select) ie list, crosstab,chart..

if i select list and crosstab then i have to get output of list and crosstab...

i have tried it using string and render variables..but i am not geting the certain anwer..

i am getting output for single select in value prompt but not getting for multi-select
Title: Re: if i select list and crosstab then i have to get output of list and crosstab
Post by: BigChris on 17 Feb 2014 08:30:00 AM
What have you got in your render variable? You'll need something along the lines of

ParamDisplayValue('Output Choice') contains 'List' 

as the render variable for the List element etc.
Title: Re: if i select list and crosstab then i have to get output of list and crosstab
Post by: mitwa on 17 Feb 2014 08:32:31 AM
ofcouse i have tried

case
when ParamDisplayValue('Parameter1') contains 'List' then 'list'
when ParamDisplayValue('Parameter1') contains 'Cross' then 'cross'
else('chart')
end
Title: Re: if i select list and crosstab then i have to get output of list and crosstab
Post by: BigChris on 17 Feb 2014 09:25:03 AM
I think you've just given me enough information to try to answer your question. You need three render variables, 1 for each of the elements that you want to conditionally display.

Variable 1: Boolean variable - ParamDisplayValue('Parameter1') contains 'list'
Variable 2: Boolean variable - ParamDisplayValue('Parameter1') contains 'cross'
Variable 3: Boolean variable - ParamDisplayValue('Parameter1') contains 'chart'

Then for each element in your report, e.g. the list element, select the appropriate render variable (in this variable 1), and display for Yes.
Title: Re: if i select list and crosstab then i have to get output of list and crosstab
Post by: mitwa on 18 Feb 2014 03:23:48 AM
thanks for ur replay..

but it is also not working properly..as i already mentioned i am getting single output but not able for both at a time :-[
Title: Re: if i select list and crosstab then i have to get output of list and crosstab
Post by: xplorerdev on 18 Feb 2014 03:27:14 AM
Hi m91,

Take a look at one of my previous posts here:

http://www.cognoise.com/index.php/topic,23627.msg73426.html#msg73426

Then select the 1st cell. Browse the mouse over the Conditional Explorer. Select NO for the corresponding variable and the select Box Type = None from left side properties. Then double click on the Green colour bar. Repeat this for all the four cell variables.

I think this is what you are asking for.

Cheers

Dev
Title: Re: if i select list and crosstab then i have to get output of list and crosstab
Post by: Francis aka khayman on 18 Feb 2014 03:49:34 AM
1. check ParamDisplayValue('Parameter1')

does it contain 'list' and 'cross' when you selected those?

2. check your Display value and Use value in your prompt.

3. check the logic in your render variables... ie (renderforcrosstab, renderforlist) ... do they get the value True (or Y)  when your parameter has 'list' and 'cross'?


Quote from: m91 on 18 Feb 2014 03:23:48 AM
thanks for ur replay..

but it is also not working properly..as i already mentioned i am getting single output but not able for both at a time :-[
Title: Re: if i select list and crosstab then i have to get output of list and crosstab
Post by: Lynn on 19 Feb 2014 09:11:57 AM
Quote from: m91 on 17 Feb 2014 08:32:31 AM
ofcouse i have tried

case
when ParamDisplayValue('Parameter1') contains 'List' then 'list'
when ParamDisplayValue('Parameter1') contains 'Cross' then 'cross'
else('chart')
end

A case statement will stop evaluating once it reaches a match, so it makes no sense to use this logic in a multi-select situation.

I think BigChris gave a response that should work and khayman gave you suggestions on how to debug, but I wanted to point out this aspect of the case statement so you can avoid a similar issue in the future.
Title: Re: if i select list and crosstab then i have to get output of list and crosstab
Post by: mitwa on 20 Feb 2014 03:34:37 AM
thanks for everyone..

i am getting certain result by using booleam expressions but not able to get by using string variables..anyhow m satisfied wit boolean expressions