COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Peewee71 on 07 Jul 2011 11:31:16 AM

Title: Best Way to Refresh a report
Post by: Peewee71 on 07 Jul 2011 11:31:16 AM
Hi,
I have a one page report which contains various prompts and a list. Example prompts are from_date and to_date. When the list report displays for the first time it displays all items in the list. If there are lots of rows in the list the user wants to enter a from_date and to_date which will refresh the list and filter down the rows to a manageable number. The prompts and the list are on the same page. Whats the best way to achieve this?

I think what i'm after is to get an onchange event on a prompt which will refresh the list. Is it possible? If so how?
Title: Re: Best Way to Refresh a report
Post by: alok on 12 Jul 2011 07:07:52 AM
Put filters on list as per date selection and give "Auto submit " to 'Yes'.It will work:)

Title: Re: Best Way to Refresh a report
Post by: bdbits on 18 Jul 2011 03:30:54 PM
What alok said. And you may also want to use a render variable to suppress the report retrieval until they select their date range. This will save a database query. For example:
* Create a render variable, call it PromptsAreNotNull.
* Create an expression like: ParamValue('pFromDate') is not null and ParamValue('pToDate') is not null
* Select your data container (crosstab, list, etc) and click the ... on Render Variable.
* Select the vPromptsAreNotNull variable, and check "Yes" in "Render for" and click OK.
* You might also want to set "No Data Contents" to "Yes" and provide some text on the data container explaining that prompts need to be selected.