Domanda

I have the following suppression formula in the details section:

{JCJM.udRough} <= #1/1/2013 12:00# AND {JCJM.udTrim} <= #1/1/2013 12:00#

and it works. However, I also need it to suppress if the udRough or udTrim field is blank. When I try to add

OR {JCJM.udRough}=""

it says that a date-time is expected where the blank quotes are. Can someone please help?

È stato utile?

Soluzione

As a general rule in CR, if a field can be null then you should explicitly check for that case first in a formula, otherwise it will not evaluate properly. Otherwise, CR will treat it like an unhandled exception.

So in your case, CR is short-circuit evaluating the expression {JCJM.udRough}<=#1/1/2013 12:00# as the very first thing, sees that the field is null, and stops evaluating the rest of the formula since it has encountered an exception.

What you need is:

(isnull({JCJM.udRough}) or {JCJM.udRough} <= #1/1/2013 12:00#) and (isnull({JCJM.udTrim}) or {JCJM.udTrim} <= #1/1/2013 12:00#)

Altri suggerimenti

Try

if ISNULL({JCJM.udRough})
Then true
else false

This is from my understanding from your question if you are searching for something different let me know will try to answer it.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top