I have to include a value of 0 for "ALL" in my parameter. There is not a value of 0 located anywhere in that table, and it always returns 0 results. All of the other values are returning the correct results. How can I configure this?
I assume you want to get all rows, regardless of PAT_ENC.CANCEL_REASON_C
if your parameter CancelReason
is 0.
Every row that filters to true
will be returned. If you want to ignore a term (0 -> all
is equivalent to ignore reason) come up with a term that logically "eliminates" your term. This can be done by concatenating with or
and an expression that evaluates to true
.
To achieve this alter your filter condition to the following:
({PAT_ENC.CANCEL_REASON_C} = {?CancelReason} or {?CancelReason} = 0)
and
// the rest of your filter
Watch out for the parentheses - They are necessary.