Print Page | Close Window

searching by keyword in 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=19406
Printed Date: 08 May 2024 at 6:23am


Topic: searching by keyword in field
Posted By: lorimack
Subject: searching by keyword in field
Date Posted: 15 Apr 2013 at 3:10am
Good morning,
 
Is it possible to search a field by a keyword? 
 
For example,I have 10 records with 3 field
 
Name
Age
Note
 
I would like to search all persons named Jim that are 42 with the word "tattoo" in the note field.  Is that possible since Note field isn't a selection, its free text?



Replies:
Posted By: Gurbs
Date Posted: 15 Apr 2013 at 3:20am
I assume you mean that you created 3 parameters that you use in your record selection? In that case it is possible, you just have to set the 'Use custom value' to yes in your parameter.

However, you will probably have to change your record selection formula then, because you will have to check if a part of the field is Tattoo.

you could change it to something like
InStr({table.field}, {?Note}) <> 0


Posted By: DBlank
Date Posted: 15 Apr 2013 at 3:58am
you can also use LIKE but neither will work if you set the param to allow multiple values
 
{table.Note} like '*' + {?Note} + '*'



Print Page | Close Window