COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: tonyk on 03 May 2012 01:14:34 PM

Title: Parameter dropdown help
Post by: tonyk on 03 May 2012 01:14:34 PM
I have a drop down parameter which is static.

"All"
"Not Blank"
"Blank"

I need to create the filter on my report which does the following

If "all" is selected there is no filter applied
If "not blank" is selected I need to do a "where table.column is not null"
and if "blank" is selected I need to do a "where table.column is null"

I cannot figure out the filter part of it. Any help is appreciated, im new to Cognos.  >:(

TIA,
Tony
Title: Re: Parameter dropdown help
Post by: HalfBloodPrince on 04 May 2012 01:01:45 AM
Hi Try this out

Create a calculated column Prompt column as
IF([Product name] is null ) then

('Null')
else
('Not Null')
(Here [Product name ] is column which contains Null values )

Then add a filter as
(?Parameter1?= 'All'  and (1=1) ) OR (  [Prompt column]=?Parameter1? )

Check its working fine then you can cut the calculated column from the list