COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: dipstm on 20 Jan 2009 11:40:11 AM

Title: Dynamically adding columns to list report based on prompt selection
Post by: dipstm on 20 Jan 2009 11:40:11 AM
Hi All,
I have a list report which has 8 columns. The columns tht appear after  the 8th column are dynamically populated based on the prompt selection in the prompt page.
For eg:- If the user selects 4 enteries say P1,P2,P3 and P4 from the prompt then in the list report there should be 4 additional columns(P1,P2,P3,P4) in addition to the 8 columns.
How can we achieve this?
Plz let me know.
Thanx in Advance.

Title: Re: Dynamically adding columns to list report based on prompt selection
Post by: fasi on 20 Jan 2009 04:12:30 PM
try the link below.

http://support.cognos.com/supported/supportlink/techniques/ta_0807_02.html


Thanks.
Title: Re: Dynamically adding columns to list report based on prompt selection
Post by: dipstm on 20 Jan 2009 06:53:21 PM
Hi,
Actually i want to add dynamically based on the values selected in the list box prompt in the prompt page.

Many Thanx.
Title: Re: Dynamically adding columns to list report based on prompt selection
Post by: cognosjon on 21 Jan 2009 06:24:57 AM
Hi,

its not very pretty but I have done this before though I only had 6 columns to display.
Created a list report containing every potential column that you want to be displayed.
On the prompt page create a value prompt (Check box) and added as static values every column Name that appears on the list report. I made the prompt mandatory.

Then create a variable that tests the prompt to see if the values selected and then use this variable as a render variable on for your column on the report.
So in my case I had six variables ( i did say it wasn't pretty) that tested the values selected in the prompt and then used these to hide or display the desired columns.

Hope i haven't confused you