Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1111
  • Last Modified:

LIKE operator in Crystal Reports

Hello,
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
0
Palmer_Admin
Asked:
Palmer_Admin
  • 2
  • 2
1 Solution
 
mlmccCommented:
You could try

{YourField} LIKE "*9*"

ANother way would be

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

mlmcc
0
 
Palmer_AdminAuthor Commented:
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

thanks

0
 
JayConverseCommented:
Sounds like you have a numeric field.  In that case,

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

should do the trick
0
 
Palmer_AdminAuthor Commented:
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
0
 
mlmccCommented:
ToText({yourfield}) like "*9*"
AND
ToText({yourfield}) <> "999"

mlmcc

0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now