COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: thart21 on 27 Jan 2012 09:36:23 PM

Title: Hide/show prompt
Post by: thart21 on 27 Jan 2012 09:36:23 PM
Hi there, is there a way to show/hide a select & search prompt with a radio button and boolean variable? I want the user to be able to show the prompt if they need to use it and hide it otherwise.

All I can find are instructions to hide particular columns in objects.

Thanks for any point in the right direction.

Toni
Title: Re: Hide/show prompt
Post by: tjohnson3050 on 28 Jan 2012 11:05:30 PM
Create the radial button prompt, then create a Boolean variable that uses the parameter from the radial button prompt.  Then insert a block and set the render variable property to use variable you created.  Put the search and select prompt inside the block.
Title: Re: Hide/show prompt
Post by: charon on 30 Jan 2012 02:32:50 AM
Hi Johnson,

do i have to set a additional sql statement , e.g. in static choices of the prompt? Or how do ideliver the information about the choosen option to the variable?  :o
Title: Re: Hide/show prompt
Post by: tjohnson3050 on 30 Jan 2012 09:42:55 AM
Use static choices in the prompt.  For example, the static choices could be:

Use Value   Display Value
-------------  ------------------
1                 Select Data Item
2                 Search for Data Item

In your boolean variable definition, say parameter value = '2'.  That will make sure the block with the search and select prompt only renders when the option 2 is selected.  Make sure you pay attention to the use value versus the display value.  When you drag a parameter over into the variable expression definition, it brings in the 'Display'.  If you want to use the 'Use' value, just delete the work display from parameterdispalyvalue.

Also make sure to either set the autosubmit property on the first prompt to yes, or insert a reprompt button.
Title: Re: Hide/show prompt
Post by: charon on 02 Feb 2012 01:49:00 PM
ty johnson, gonne try that out :)
have a nice weekend  8)