If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

[10.1.1] How to apply a condition to a filter ?

Started by hittony, 08 Apr 2014 10:14:12 AM

Previous topic - Next topic

hittony

Hey :)

Is it possible to apply a condition to a filter ?

I explain : if the condition si true, the filter should be required, otherwise it should be optional.

Thanks in advance for your help !

;)

MFGF

Hi,

Assuming your "condition" to drive this is (for example) [Field] = 100

the approach I would take is:

([FIELD] = 100 AND <current filter expression>) OR ([Field] <> 100 AND (<current filter expression> OR 1=1))

Cheers!

MF.
Meep!

hittony

Quote from: MFGF on 08 Apr 2014 12:13:00 PM
Hi,

Assuming your "condition" to drive this is (for example) [Field] = 100

the approach I would take is:

([FIELD] = 100 AND <current filter expression>) OR ([Field] <> 100 AND (<current filter expression> OR 1=1))

Cheers!

MF.

I forgot to detail that the filter was linked to a parameter. With your approach, the report asks users to give a value in both 2 cases, which isn't what i want to carry out :(

Lynn

Try setting a default value for the parameter.