COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Starfish2201 on 18 Dec 2012 11:36:10 AM

Title: Can we add OR condition in drill through parameters
Post by: Starfish2201 on 18 Dec 2012 11:36:10 AM
Hi Gurus,

I have a requirement of passing "OR" condition in the drill through parameter, lets say I want to see all the target report data when

dataitem1 is null or
dataitem2 is null or
dataitem3 is null

Thanks a lot for your help !!!
Title: Re: Can we add OR condition in drill through parameters
Post by: MFGF on 18 Dec 2012 12:17:05 PM
You can only pass data items/parameters etc in drill-through definitions. The actual filtering is done in the target report. From the looks of your requirement you can simply pass the three data items in your drill-though definition, and define your filter in your target report exactly as you have described.

Cheers!

MF.
Title: Re: Can we add OR condition in drill through parameters
Post by: Starfish2201 on 18 Dec 2012 03:25:17 PM
Thanks MFGF..

But my problem is how I would put the OR condition in the filters? If I put each dataitem as a separate filter, cognos will take it as an AND condition.
Like dataitem1 is null
and dataitem2 is null
and dataitem3 is null

whereas I want to  put OR in there.

Can you please help ?
Title: Re: Can we add OR condition in drill through parameters
Post by: RKMI on 18 Dec 2012 04:45:25 PM
Hi,

As MF mention you need your target report to take the correct set of parameters being passed from your source by making the filters in your target report optional you will get the desired output.

Thanks,
RK
Title: Re: Can we add OR condition in drill through parameters
Post by: MFGF on 19 Dec 2012 03:06:16 AM
In your target report, code a single filter with the expression

[dataitem1] is null OR [dataitem2] is null OR [dataitem3] is null

Cheers!

MF.