LIKE operator in Crystal Reports

Posted on 2011-02-14
Last Modified: 2012-05-11
Quick question: I am trying to use LIKE operator in my Operation field.
Operation - number value
So I want to Supress if Operation has value '9' in it.
I am using inside Format Editor --> Supress --> X2 box for Formula

thank you
Question by:Palmer_Admin
  • 2
  • 2
LVL 100

Expert Comment

ID: 34891418
You could try

{YourField} LIKE "*9*"

ANother way would be

InStr({YourField},"9") > 0


Author Comment

ID: 34891464
Hello MLMCC,
I get this error when I use:
{YourField} LIKE "*9*" - a string is required here

if I use the other command I get this error:
Not enough arguments have been give


LVL 12

Accepted Solution

JayConverse earned 350 total points
ID: 34892874
Sounds like you have a numeric field.  In that case,

ToText({yourfield}) like "*9*"

should do the trick

Author Comment

ID: 34899304
JayConverse, is there a way to add exlude Operation "999"? the user came up to me and said that they want Operation "999"

thank you
LVL 100

Expert Comment

ID: 34903694
ToText({yourfield}) like "*9*"
ToText({yourfield}) <> "999"



Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Formula to get month and year from date 5 53
Not Exists 3 65
Crystal Reports Repeat Report Footer X amount of times 6 30
Crystal reports subreports as total of main report 13 52
Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Sending a Secure fax is easy with eFax Corporate ( First, just open a new email message. In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now