COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Topic started by: anwar_pat on 09 Jul 2007 03:51:38 AM

Title: Hiding COlumn based on Prompt
Post by: anwar_pat on 09 Jul 2007 03:51:38 AM
Hi All,
  i want to show the report column based on user select into prompt list box.I mean i have prompt page where i m showing all necessary column with multi select options so that user can select only those he/she needs into reports.I am trying the hiding options based on prompt values.I have created string variable and inserted values as column name same as prompt static values and i hve written variable expression following.


Case

When ParamDisplayValue('Parameter1')='Col1' then 'Col1'

When ParamDisplayValue('Parameter1')= 'Col2' then 'Col2'

When ParamDisplayValue('Parameter1')= 'Col3' then 'Col3'
---------so on....

ELSE 'Col12'

END

i have set the properties of each column style varaible coressponding colmn name values and set the box type none.

Am i doing the correct way or any other way can i achive.pls any ideas or thougt would be appreciable.

thanz n advance.


Anwar
Title: Re: Hiding COlumn based on Prompt
Post by: Desperado on 09 Jul 2007 02:25:49 PM
for every column u need to have a variable. you shouldn't do it on one variable.
Title: Re: Hiding COlumn based on Prompt
Post by: anwar_pat on 10 Jul 2007 02:52:17 AM
thanx for reply.Can you please elobrate me in detail or steps how should i proceed.
Title: Re: Hiding COlumn based on Prompt
Post by: Desperado on 10 Jul 2007 09:49:25 AM
create a boolean variable var_col1.
insert something like this

ParamValue("Par_Chk_Opt_Fields") contains('col1')

then select this variable from variable explorer and apply this variable on col1.

Title: Re: Hiding COlumn based on Prompt
Post by: anwar_pat on 10 Jul 2007 11:05:10 PM
thz for reply..done it.