This can be annoying, but it's fairly easy to overcome.
BTW, this would be MUCH easier to explain were you to have provided the parms, database field names and their data types.
I use a standard sort of methodology which does 2 things, it assures that I pass through SQL, and it allows for all or selected values, here's an example of how I construct the Record Selection Criteria, note that I have a fairly complex model wherein the start and end date ranges are computed from formulas, and the parameters are multiple parameters (hence the [1] subscript) which have a default of "All" to return all rows, though I also return all rows if they pass nothing:
(
({MyTable.UTCTIME} >= {@Date Range Start})
and
({MyTable.UTCTIME} <= {@Date Range End})
)
and
(if {?Node}[1] <> 'All'
and {?Node}[1] <> ''
then
({MyTable.NODENAME} in {?Node})
else
if {?Node}[1] = 'All'
or {?Node}[1] = ''
then
true)
The parens are important, don't cheat this because it looks like overkill, it is intentionally formed to provide the best odds of getting pass through. Note that parameters NEVER create a NULL, so you don't want to check for null.
If the above post doesn't match your criteria, do us a favor and post your record selection criteria, it's hard to guess at what you might be constructing, and for what purpose.
-k
kai@informeddatadecisions.com