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

Value Prompt is Null or NOT NULL, set the filter expression

Started by bioCam, 16 Nov 2010 08:38:36 AM

Previous topic - Next topic

bioCam

Hi,  My report has a Value Prompt to select none, one or more Region. 

The original report filter -> [LOCATION_CD] in (?p_region?)  -> this works, no problem.

I modified the filter to -> if (?P_region? is not null ) then ([LOCATION_CD] in ?P_region?) else (0) -> this filter expression fails.

An alternate method is to set the default Value Prompt to (0) then I don't need to modify the original report filter.  Does anyone know why my modified Value Prompt filter expression is not working??  Thank you in advance.



rockytopmark

Because (0) isn't a valid filter expression.  Try:

if (?P_region? is not null ) then ([LOCATION_CD] in ?P_region?) else (1 = 1)

bioCam

Hi rockytopmark,

Thank you ..your solution if (?P_region? is not null ) then ([LOCATION_CD] in ?P_region?) else (1 = 1) works  :D

I then changed the expression back to if (?P_region? is not null ) then ([LOCATION_CD] in ?P_region?) else (0) and when I validate it, it's not showing me anymore errors   ???

I am using Cognos 8.3 INR version, no patches no far.  Is this a Cognos 8.3 stability issue ???