Avatar of Matt Harrison
Matt Harrison
 asked on

Multiple criteria on one field

I have primary created reports in access but I am attempting to switch over to crystal. I am having an issue figuring out how to implement multiple conditions on one field.

Example

{ML.ML_LOCATION} in ["FACSUPPLY", "HFACSUPPLY", "MAINSUPPLY", "MBSUPPLY"]

but then I also need to pull anything that is in ML.ML.LOCATION that is between A-14-01-A to A-14-01-F and between A-12-01-A to A-12-06-F

I cant seem to figure out how to get that all to work together? I tried
{ML.ML_LOCATION} in ["FACSUPPLY", "HFACSUPPLY", "MAINSUPPLY", "MBSUPPLY"] and
{ML.ML_LOCATION} in "A-14-01-A" to "A-14-01-F" and
{ML.ML_LOCATION} in "A-12-01-A" to "A-12-06-F"

but that did not seem to work properly. Any suggestions?
Crystal Reports

Avatar of undefined
Last Comment
Matt Harrison

8/22/2022 - Mon
Éric Moreau

1- you will need to replace AND with OR
2- Does CR supports BETWEEN?

({ML.ML_LOCATION} in ["FACSUPPLY", "HFACSUPPLY", "MAINSUPPLY", "MBSUPPLY"]) OR
({ML.ML_LOCATION} between "A-14-01-A" and "A-14-01-F") OR
({ML.ML_LOCATION} between "A-12-01-A" and "A-12-06-F")

Open in new window

ASKER CERTIFIED SOLUTION
Matt Harrison

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck