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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

737 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