COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: sumesh2429 on 19 Nov 2011 08:19:26 AM

Title: Checkbox prompt value in dataitem makes it Single select
Post by: sumesh2429 on 19 Nov 2011 08:19:26 AM

Hi ,

When i am taking the parameter values passed by my check box prompt in a data item which is displayed in the Report page list , the Check Box automatically becomes single select Radio button. Do i need to change some settings here to display the check box as it is with Multiselect option ?

Thanks
Title: Re: Checkbox prompt value in dataitem makes it Single select
Post by: pricter on 19 Nov 2011 08:27:48 AM
Have set to YES the multiselect property of the prompt?
Title: Re: Checkbox prompt value in dataitem makes it Single select
Post by: sumesh2429 on 19 Nov 2011 08:36:33 AM
yeah. I have done it. And it is Multiselect when we dont take the data item in the report page. As soon as the data item is pulled on to the report page the check box becomes a radio button
Title: Re: Checkbox prompt value in dataitem makes it Single select
Post by: pricter on 19 Nov 2011 09:29:22 AM
How do you use the parameter of the prompt
For example do you use = or in?
Does this data item has any relationship with the parameter of the prompt?
Is it both used in the same query?
Title: Re: Checkbox prompt value in dataitem makes it Single select
Post by: sumesh2429 on 19 Nov 2011 11:00:09 AM
I am using the Parameter in a dataitem only and not in any filters hence there is no = or IN operator used anywhere.
My dataitem just contains ?Par_Val? . When this dataitem is pulled in report page , the checkbox becomes radio button automatically . I am not sure why this is happening
Title: Re: Checkbox prompt value in dataitem makes it Single select
Post by: HalfBloodPrince on 19 Nov 2011 11:29:32 AM
It is because you have not used any filter with prompt. If  you want multiple values from the prompt selection then you have to use In operator in filter  [data item] in ?parameter?. Add this kind of filter and make it optional. Try this
Title: Re: Checkbox prompt value in dataitem makes it Single select
Post by: pricter on 20 Nov 2011 02:30:21 AM
Quote from: sumesh2429 on 19 Nov 2011 11:00:09 AM
I am using the Parameter in a dataitem only and not in any filters hence there is no = or IN operator used anywhere.
My dataitem just contains ?Par_Val? . When this dataitem is pulled in report page , the checkbox becomes radio button automatically . I am not sure why this is happening

In my opinion when you a parameter in a data item it is better to use a macro
#prompt(...)# for single option
#promptmany(..)# for multiple

Check this (http://publib.boulder.ibm.com/infocenter/rentrpt/v1r0m1/topic/com.ibm.swg.im.cognos.ug_cr_rptstd.8.4.1.doc/ug_cr_rptstd_i_cr_rptstd_wrkdat_add_query_macro.html#cr_rptstd_wrkdat_add_query_macro) for details.

Why do you use the parameter in the data item?
Title: Re: Checkbox prompt value in dataitem makes it Single select
Post by: sumesh2429 on 25 Nov 2011 01:06:31 AM
Hi Pricter ,

Adding a dummy parameter like ?Par_Val? in ?Par_Val? did the trick . Now its showing up as multiselect prompt only :)