Print Page | Close Window

Two criteria on one field

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=23018
Printed Date: 29 Apr 2024 at 5:58am


Topic: Two criteria on one field
Posted By: bjfils
Subject: Two criteria on one field
Date Posted: 12 Sep 2022 at 5:12am
I need to add a selection criteria to the below and can't get the syntax to work. The issue is the other credit is for something not in the field. I need to exclude records if "xrerun" in the same field. I know I could duplicate all of the selection criteria and make "or" the last line in the current set and then repeat it all changing the below to "not like". I'd like to keep it all in one line. How do I put together that criteria?

"craft" in {Ticket.GeneralDescr} and



Replies:
Posted By: kevlray
Date Posted: 13 Sep 2022 at 3:56am
if you have multiple items that you want to exclude for a field.  The basic format is something like this not({somefield} in ('this', 'that'))



Posted By: bjfils
Date Posted: 13 Sep 2022 at 4:02am
Can I combine that into one line with the include query I have? I want to include "craft" and exclude "xrerun" from the same field.


Posted By: kevlray
Date Posted: 14 Sep 2022 at 11:52am
It would have to be two statements ANDed together.


Posted By: bjfils
Date Posted: 15 Sep 2022 at 3:17am
Thought that might be the case. Never hurts to ask. Thanks!



Print Page | Close Window