COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: fshahul on 02 Feb 2009 03:43:02 AM

Title: Check Box Prompt Issue
Post by: fshahul on 02 Feb 2009 03:43:02 AM
Hi,

We came across an issue with scheduling a report.

We have used a Value Prompt (Checkbox UI, Optional prompt) in the report. This particular prompt was not used in the query. Hence at the time of scheduling, prompt was not displayed in the event studio prompt values list. So we have added prompt parameter as a data item in the query and tried scheduling it. This time we got the prompt listed in the prompt values list but while selecting values in the prompt page, check box was converted to radio button.

We have just used a single static choice value i.e. “Yes” for this prompt.

Check box appears normal when we run report manually without adding query for the prompt.

Is it possible to have a value prompt (Checkbox UI, optional prompt) for a single static value?

Look forward to have solution for this query.

Thanks in advance..
Title: Re: Check Box Prompt Issue
Post by: jse_aus on 05 Apr 2009 06:40:40 PM
Hi, I have the same issue, I require a checkbox on the report prompt page to determine if I am going to apply a hardwired where clause (filter).
The prompt displays as expected when I dont use it in any report items - but as soon as I try to "use" the parameter, the prompt changes to a "radio button"!

Out of interest, what version of Cognos are you using?  I have Cognos 8.2 SP1, I wonder if this is a bug with the product?

Did you end up getting yours to work as expected?
Title: Re: Check Box Prompt Issue
Post by: jse_aus on 06 Apr 2009 12:08:09 AM
Found it.  I dont understand why this is required, but if you change the code in the report filter to the snippet below, it works fine (ie, the prompt displays as a checkbox).

if(#promptmany('apply_filter', 'string', sq('Yes'))# = 'Yes')
then ([Open Date] <> to_date('14-apr-2008','dd-mon-yyyy'))
else ([Open Date]=[Open Date])

Basically the filter is only applied when a user ticks the checkbox.  May seem like a strange requirement, but thats what the user wants!