COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: midhl on 14 May 2009 02:49:15 AM

Title: How to hide a date prompt in a prompt page
Post by: midhl on 14 May 2009 02:49:15 AM
Hi,

Ive got a requirement where in there is a value prompt which has yes and no as static choice values and yes as a default selection ,also there is a date prompt in the prompt page.If the value yes is chosen in the value prompt then the date prompt needs to be hidden and if no is selected it needs to get displayed.I could achieve this partially i.e when the report is run the date prompt is getting hidden (since yes is the default value),but when no is chosen in the value prompt then the date prompt is not getting displayed.Any ideas how to achieve it?
Thanks
Title: Re: How to hide a date prompt in a prompt page
Post by: billylodz on 14 May 2009 03:39:02 AM
date prompt in box ? with render varable ?

Auto submit on value prompt ?
Title: Re: How to hide a date prompt in a prompt page
Post by: kalyan_y on 14 May 2009 07:34:58 AM
1) Take a value prompt with static values as Yes and No. Set AutoSubmit property to Yes.
2) Take another value prompt and set the cascade source property to the parameter of the first value prompt.
3) Take a boolean variable with the expression ParamDisplayValue('VP') = 'Yes', where VP = parameter of the first value prompt.
4) Take a date prompt. Set the style variable property to the boolean variable in step 3. Set the box type to None when the value is Yes and blank when No.
Title: Re: How to hide a date prompt in a prompt page
Post by: midhl on 14 May 2009 07:56:25 AM
Its working.Thanks for your prompt replies folks.
Title: Re: How to hide a date prompt in a prompt page
Post by: david.stachon on 20 May 2009 10:29:08 PM
yes, nice solution kalyan_y

...i've put up a sample of using that technique (for 8.4)