COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: tlynnm4591 on 14 Jan 2014 09:40:59 AM

Title: Render certain number of rows based on prompt selection and/or variable
Post by: tlynnm4591 on 14 Jan 2014 09:40:59 AM
Ho, using Cognos 10.1 to develop a list report in Report Studio. I have a need to allow the user to use a drop down box to select the number of rows to display whether that's 10, 50, 100 or all rows. This needs to be done at the report page level versus applying a filter based on the selection prompt to limit the rows ( i do understand how to do that) as I need the full list of returned values in the query to do another calculation.

How can i use a variable to determine how many rows are rendered in a list?

Thanks and much appreciated!
Title: Re: Render certain number of rows based on prompt selection and/or variable
Post by: navissar on 14 Jan 2014 03:42:16 PM
Check this out:
http://cognosandme.blogspot.co.il/2011/10/dynamic-rows-per-page-approach-2.html
Title: Re: Render certain number of rows based on prompt selection and/or variable
Post by: charon on 14 Jan 2014 04:12:03 PM
hi tlyn,
there might be another approach, similar to the "rank" functionality

1) create a new data item [dynamic rowcounts] with "running-count" (or "count" function, i cant quite remember)
2) create a detailfilter, using a syntax [dynamic rowcounts] < ?pt_rows?
withe the parameter ?pt_rows? geting his value from your prompt, which has static choices and delivers an integer like 5, 50 or what ever you need.

might work...gl and cheerz :)