I have a optional parameter field in Crystal 2008 which allows multiple values.
If the user doesn't want to filter by this field, they should leave it blank and see records regardless of what is in this field.
I've tried the following in the Record Selection Formula:
(if {?PARAMETER} <> "" or not isNull({?PARAMETER}) Then {TABLE.FIELD} in {?PARAMETER})
But if there's no value in the parameter I get a "Parameter has no value" message.
When a Parameter allows single values only, I have set the default value to "All" and then used the following:
(if {?PARAMETER} <> "All" then {TABLE.FIELD} = {?PARAMETER})
But if I set the default to "All" in a Multiple-allowed parameter and the user doesn't remove the "All" before adding the values they do want, all records are returned.
Solution?
If the user doesn't want to filter by this field, they should leave it blank and see records regardless of what is in this field.
I've tried the following in the Record Selection Formula:
(if {?PARAMETER} <> "" or not isNull({?PARAMETER}) Then {TABLE.FIELD} in {?PARAMETER})
But if there's no value in the parameter I get a "Parameter has no value" message.
When a Parameter allows single values only, I have set the default value to "All" and then used the following:
(if {?PARAMETER} <> "All" then {TABLE.FIELD} = {?PARAMETER})
But if I set the default to "All" in a Multiple-allowed parameter and the user doesn't remove the "All" before adding the values they do want, all records are returned.
Solution?