COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: thart21 on 16 Jun 2012 10:28:16 AM

Title: Radio buttons and excludes filter
Post by: thart21 on 16 Jun 2012 10:28:16 AM
I am trying to use two radio buttons 'Yes' and 'No' to use as a filter. Have tried a CASE WHEN statement but cannot seem to get the <> part correct. Getting an error at the "not in" part.

CASE WHEN(?Golf? = 'No')  THEN([Presentation Layer].[Regional Product].[Cat Cd (Sls Org)] not in ('000233')
ELSE... show all Cat Cds

END

Thanks for any help you could give,

Toni
Title: Re: Radio buttons and excludes filter
Post by: blom0344 on 16 Jun 2012 11:17:25 AM
How about:


CASE WHEN(?Golf? = 'No')  THEN([Presentation Layer].[Regional Product].[Cat Cd (Sls Org)] <> '000233'
ELSE 1 = 1 END
Title: Re: Radio buttons and excludes filter
Post by: CognosPaul on 16 Jun 2012 10:29:48 PM
How about setting the static value of the prompt object to:

Display | Use
----------------------
No       |  [Presentation Layer].[Regional Product].[Cat Cd (Sls Org)] <> '000233'
Yes      | 1=1

Set the default value to one of those. And your filter should be a simple
#prompt('Golf','token')#
Title: Re: Radio buttons and excludes filter
Post by: thart21 on 18 Jun 2012 02:19:39 PM
Thanks so much for the replies, I used the static values option and set the default values in my prompts, very cool!  I will be using the CASE statement a lot as well. 

Thanks again, new to Cognos and love the forum!

Toni