COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: Good Friend on 21 Aug 2024 06:05:46 PM

Title: **** Default selection not working in check box value prompt (11.1.7) ****
Post by: Good Friend on 21 Aug 2024 06:05:46 PM
Hello Friends,

I'm trying to ensure that a default value is pre-selected for a check box prompt from a list when the page loads. However, the default value is not being selected as expected, and if the user submits the report without making any changes, all values are being processed. I've attempted to use JavaScript to resolve this issue, but it hasn't worked. Any workaround would be greatly appreciated. Thank you.
Title: Re: **** Default selection not working in check box value prompt (11.1.7) ****
Post by: cognostechie on 22 Aug 2024 01:24:10 PM
There is a 'Default Selection' property in the prompt
Title: Re: **** Default selection not working in check box value prompt (11.1.7) ****
Post by: Good Friend on 22 Aug 2024 02:28:22 PM
I did setup a default option like 25 but when I run the report the prompt box is showing all the values instead of 25 being selected.
Title: Re: **** Default selection not working in check box value prompt (11.1.7) ****
Post by: dougp on 22 Aug 2024 03:58:01 PM
At the risk of repeating myself for the 7893707650710th time...

Please post a report spec using the samples data (GO Sales (query) package) that demonstrates the problem.  If you can't post it here, put it on pastebin and post the link here.
Title: Re: **** Default selection not working in check box value prompt (11.1.7) ****
Post by: Good Friend on 22 Aug 2024 05:02:28 PM
Sorry I'm not aware of it and we don't seem to maintain sample Go sales Packages.

I've attached an example of the checkbox prompt where the default value should be '04'. Even though I've set '04' as the default value in the properties, the checkbox appears unchecked when I run the prompt page. Can you please help me resolve this issue?
Title: Re: **** Default selection not working in check box value prompt (11.1.7) ****
Post by: Good Friend on 22 Aug 2024 05:44:39 PM
Quote from: dougp on 22 Aug 2024 03:58:01 PMAt the risk of repeating myself for the 7893707650710th time...

Please post a report spec using the samples data (GO Sales (query) package) that demonstrates the problem.  If you can't post it here, put it on pastebin and post the link here.
Replied back directly
Title: Re: **** Default selection not working in check box value prompt (11.1.7) ****
Post by: cognostechie on 22 Aug 2024 06:38:16 PM
Quote from: Good Friend on 22 Aug 2024 05:02:28 PMSorry I'm not aware of it and we don't seem to maintain sample Go sales Packages.

I've attached an example of the checkbox prompt where the default value should be '04'. Even though I've set '04' as the default value in the properties, the checkbox appears unchecked when I run the prompt page. Can you please help me resolve this issue?

You just have to type 04, not '04' in the 'Default Selections' property. Not sure what you mean by 'default value'.
Title: Re: **** Default selection not working in check box value prompt (11.1.7) ****
Post by: Good Friend on 23 Aug 2024 08:35:12 AM
Ofcourse I tried '04' and 04 but nothing worked. When I say default value I meant default selection.
Title: Re: **** Default selection not working in check box value prompt (11.1.7) ****
Post by: cognostechie on 23 Aug 2024 12:40:01 PM
It has always worked for me, maybe a bug in your version. Call IBM for support.
Title: Re: **** Default selection not working in check box value prompt (11.1.7) ****
Post by: Good Friend on 23 Aug 2024 04:08:13 PM
Any other workaround like JavaScript or something
Title: Re: **** Default selection not working in check box value prompt (11.1.7) ****
Post by: cognostechie on 23 Aug 2024 08:39:44 PM
There is another property 'Static Choices'. Try putting 04 there. It should display 04 as the 1st choice in the prompt. Keep 04 in the Default Selection also.
Title: Re: **** Default selection not working in check box value prompt (11.1.7) ****
Post by: Good Friend on 24 Aug 2024 10:47:21 AM
Thank you. Seems to be a good workaround and it is showing as the 1st choice with that value selected but the value is repeating twice in that prompt. I can remove that duplicate value from the prompt which is coming later but users might be a little confused with the sorting and value coming on the top.