Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Rows per Page

Status
Not open for further replies.

qberta01

Programmer
Nov 14, 2005
113
Hello,

The end user would like to be able to select the number of rows to return in a HTML driven report. I was thinking I would add a text box prompt on the report and then use javascript to set the number of rows to display. Is this even possible?

Cognos BI 8.4

thx,

Q.
 
I honestly have no idea if this is possible. An alternative is to offer a distinct set (say 25-30-35-40 etc) in a prompt by creating a collection and have as many report pages as collection values. It is then purely a matter of hiding all pages through a render variable and making sure each page has the proper number of rows set. This way you can show the page with the proper no .of rows..

Okay , not really what you are looking for, but perhaps a nice alternative..

Ties Blom

 
Ties, thanks for your response. I am not really sure how to go about implementing your alternative solution.

Q
 
1. Use a value prompt without an associated query
2. Use the collection property to add as many values as you want (25-30-35-40 etc) Call parameter: display_page
3. Create as many report pages as there are values in your collection (effectively copy the report page as many times as needed)
4. Create string variable Show_me_the_page with values
(25-30-35-40 etc)
5. Define the variable expression as : ParamValue('display_page')
6. For each report page set 'Show_me_the_page' as render variable in the properties of the page.
7. Assign the value of 'render for' for each page
8. In the list object for each report page set the 'Rows per page' value according to the value (25-30-35-40 etc)

This way only the page will be rendered that corresponds with the value selected in the added prompt.

Ties Blom

 
Okay - thanks for the "step-by-step". It makes perfect sense. A little clunky, but a nice alternative. I will see if it works for the powers that be.

thx,

Q.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top