If you are unable to create a new account, please email support@bspsoftware.com

 

Different Prompt Selection to display different Container (List , crosstabs etc)

Started by shukscog, 07 Jul 2013 05:50:45 AM

Previous topic - Next topic

shukscog

Dear All
Need your help in achieving this (Or knowing if its not possible) in Cognos 10.1.1
I have two Radio Button Prompts on my report page. I also have two lists on my report page. My requirement is - As soon as I click on 1st prompt , the 1st list should be visible (along with filtered data from 1st prompt). When I click on the 2nd prompt, the 2nd list should only be visible Along with filtered data from 2nd prompt) and the 1st list should hide. I tried this using conditional block but cant get anywhere. Also could not find something in javascript where I could deselect the 1st prompt if the 2nd one is selected etc but cannot get to a solution.
Would be grateful for help.
Regrds
Shuks

wyconian

Hi

I'd suggets you need to set render variables on the lists.  Set up a variable so you know which list is required.  You can then set the render variable on the list to only show (render) it when required.

Hope that helps

shukscog

Hi Wyco,
Thanks for your reply. Could you please elaborate more ? The problem is that even though I am toggling between prompt 1 and 2, both of them are selected at all times. For example , I select X on prompt 1 to show list 1 and then select A on prompt 2 to show list 2 - at this point the prompt 1 is still selected with value X. So if I try to use a render variable, it will render both the lists/crosstabs since both the prompts are selected. Please let me know your thoughts .

Regards
Shuks

wyconian

Hi

You could still use the render variable but you need to be specific how you code the variable.

For example if you want to how list 1 when prompt 1 = x and prompt 2 <> a and you want to show list 2 when prompt 1 = x and prompt 2 = a then you could code a string variable as something like

IF (?prompt1? = 'x' and ?prompt2? <> 'a'') then ('list1') else
(    IF (?prompt1? = 'x' and ?prompt2? =  'a'') then ('list2') else ('other')    )

This would give you 3 possible values (which you will need to add)

You can then add the render variable to the list and render list 1 where the value of the variable = 'list1' and render list2 where it is 'list2'

You just need to make sure the logic for your variable is good enough.

Hope that helps

shukscog

Hi Wyco,

Apologies for getting back after so many days. I see your point and its a very good suggestion. I'll give it a try. Thanks once again for getting back :)
Regards
Shuks