Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

ronnutter (TechnicalUser) (OP)
21 Feb 02 8:28
Is there a contains function in Crystal.  I want to search on a string field that contains a certain phrase.

ex.
record1 - abc glen street, 23456
record2 - xyz glen street, 23457
record3 - glen 12457 st., 23456

i want the search to contain 'glen' so it will pull all three records.

thanks,
mbarron (TechnicalUser)
21 Feb 02 8:54
For your select expert use:
"glen" in {address.field}

Mike

dgillz (Instructor)
21 Feb 02 10:27
InStr("string") will return the character number, as an integer of where "string" is first encountered.  If it is not encountered it will return a zero.

InStrRev() works much the same way only it starts at the right of the string instead of the left.

Hope this helps.

Software Support for Macola, Crystal Reports and Goldmine

ronnutter (TechnicalUser) (OP)
21 Feb 02 13:57
thanks for the responses:

a KISS approach is to use like in the select expert.  

{bill_address.address} like "*glen*" for the above example.

thanks,

mbarron (TechnicalUser)
21 Feb 02 14:11
I've had problems with the like function when the field I was checking had variable length strings.

Mike

kenhamady (Instructor)
21 Feb 02 19:34
Try them all and see which works best.  Usually when a Variable length string is a problem, it means that CR is reading it as a Memo field and can't process it in any formula.  If that is the case then none of these approaches will work.   See FAQ149-276.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
http://www.kenhamady.com/
tek@kenhamady.com

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close