COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Prakash Bhai on 24 Aug 2010 07:24:51 AM

Title: On Page Load
Post by: Prakash Bhai on 24 Aug 2010 07:24:51 AM
Hi All,

In the main report page, I am having a text box prompt and a Finish(Prompt Button). And am having a list with Serial Number as a column.  When I enter a serial number in the text box and press finish, the list has to appear. At the run time, I need only text box prompt to be visible, but not the list.

Regards

Ram.
Title: Re: On Page Load
Post by: CognosPaul on 24 Aug 2010 08:04:32 AM
So you need to render the list only when the parameter is not null?
Title: Re: On Page Load
Post by: Prakash Bhai on 24 Aug 2010 08:59:30 AM
Yes Paul, When I enter a serial Number in the text box,the list column has to appear.
Title: Re: On Page Load
Post by: tupac_rd on 24 Aug 2010 09:31:51 AM
Can you use conditional variable for the whole list, with box type none etc.,
Title: Re: On Page Load
Post by: Prakash Bhai on 24 Aug 2010 09:39:45 AM
Hi Tupac,
I have used the same.By taking a Boolean variable. In that I have dragged the parameter which is related to the textbox. And I have selected entire list and assigned boolean variable to that. And For Yes or No Part. I did Box type as none. I mean to say for No part.
But When I run the report, I am getting text box . but when I enter a value and press finish. I don't find any change.
Title: Re: On Page Load
Post by: tupac_rd on 24 Aug 2010 10:06:18 AM
so does your expression say Paramvalue('parameter name you are using') is not null
Title: Re: On Page Load
Post by: Prakash Bhai on 24 Aug 2010 10:09:05 AM
No. I have just dragged the parameter
Title: Re: On Page Load
Post by: CognosPaul on 25 Aug 2010 03:03:10 AM
You're working in the right direction. Instead of using a style variable try using a render variable. Setting the box type to none will still cause the list to be rendered - it will just be hidden from view.

Also, simply dragging the parameter into the expression editor will not be sufficient. It needs to be a Boolean expression returning either true or false. As Tupac suggested, paramvalue('paramname') is not null will work well for your needs.

The render variable will process before the page is loaded. It determines if the expression is true (is paramvalue('paramname') not null?) If the parameter is null then the list will not be rendered.