troubleshooting Question

Ignore parameter if no value entered

Avatar of MikeM670
MikeM670 asked on
Crystal Reports
22 Comments2 Solutions1383 ViewsLast Modified:
Crystal Reports IX
SQL 2014

I have a report with multiple parameter values.  There are four parameter's that check on single field.  I want to allow the report to ignore any of the second, third or fourth parameter's that are left blank if they are not needed in the query.

First the field I wish to search:
Table: CaseMaster
Field: UCRCodeAll  varchar()   Allows Nulls but would need to check for both NULLS or ""

A hardcoded query looks like this:
(({CaseMaster.UCRCodeAll} like "*8028*") or ({CaseMaster.UCRCodeAll} like "*5060*"))

A Parameter based query that requires the user to enter a value.
(({CaseMaster.UCRCodeAll} like "*" & {?UCR Code 1} & "*")
or ({CaseMaster.UCRCodeAll} like "*" & {?UCR Code 2} & "*"))

UCRCodeAll data looks like this:


Data would be returned on the 1st - 3rd row.

The parameter fields are:
UCR Code 1
UCR Code 2
UCR Code 3
UCR Code 4

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 22 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 22 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros