Parameter skip if empty

Try 0(8)?

No joy…

image

It lets you type it, but does it get mad when you click OK?

yeah, type mismatch. Same if it’s x(8). If I put a number in there, I just get a warning that there could be a type mismatch, but it works.

  1. Make the Param an Int, with default value = -1

  2. Add two table criteria with the field >= expression and the field <= expression
    image

  3. The expressions should be:
    (case when @TestParam = -1 then -1 else @TestParam end) for “>=”
    (case when @TestParam = -1 then 9999999999 else @TestParam end) for “<=”

What about null? (back to the calculated field thing?)

Do you know of any tables of the top of your head that have an integer column that can be null? Just asking so I can do some testing against.

no, I don’t. It’s only null because of a left join in the BAQ.