COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: sumesh2429 on 06 Nov 2013 08:00:23 AM

Title: Case Statement changes Multiselect Prompt to single select
Post by: sumesh2429 on 06 Nov 2013 08:00:23 AM
Hi ,

I have a filter on a column called book_date . The filter looks like [Book Date] in ?Accounting_Period?

This works fine and shows the prompt as a multiselect prompt . But when I try to add a case statement which looks like below , the prompt changes to single select radio button instead of the check box I have .

[Book Date] in
(Case when ?Filter On? in ('Accounting Period')
then
?Accounting Period?
else
{sysdate}
end)

The above filter makes the prompt a radio button single select . Does anyone know what is the Issue in the above filter?  I am using Cognos 10 Reportstudio.

Thanks,
Title: Re: Case Statement changes Multiselect Prompt to single select
Post by: Lynn on 12 Nov 2013 11:01:40 AM
The problem is that you have ?Accounting_Period? as the outcome of a "then" in the case statement. How could that possibly work if multiple values were selected from the prompt?

Is the expression intended as a filter? If so, then case logic is not your friend. Maybe the below is what you're after?


(
  [Book Date] in ?Accounting_Period?
  and
  ?Filter On? in ('Accounting Period')
)
or
(
  [Book Date] not in ?Accounting_Period?
  and
  [Book Date] in {sysdate}
)