Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Specific word selection

Status
Not open for further replies.

kokomol

Technical User
Jun 8, 2006
18
US
I want to create reports that restrict specific words from inventory descriptions. For example, there are hundreds of different inventory descriptions and I want to look at those that are "catheters". How can I restrict the report to those descriptions that contain this word?
 
In your report selection criteria place the following:

//replace table/field name with actual description field.
{inventory.description} like '*catheters*'

It would be better given that you used catheters only as an example to perhaps use a parameter for your search term.

Create a new parameter called: Search

Prompting text: Enter whole or partial word here
Value type: string

Then in your selection criteria place the following:

//This will search for any given phrase from a prompt.
{inventory.description} like '*{?Search}*'

This is not the most effecient manner in which to carry out the searches but is the easiest way to ensure results with ease for users and will help you understand the way crystal handles it more.

'J

 
It's not particularly inefficient, the WHERE clause will pass to the database, and depending upon the database, it's as efficient as any other means.

In particular it's meant to be placed in the Report->Record Selection->Record

I'd like to learn about the more efficient means to search a string.

-k
 
By efficient I was referring to the use of '*string*' as opposed to 'string*' or '*string' or 'string'.

Not a great difference yet still room for improvement.

'J
 
Thank you so much! I am able to isolate words and create the reports I want from the description following your recommendation. I tried making a parameter too but for some reason there is no prompt and the report pops up with no data. I appreciate your help!
 
When using the parameter, set the record selecion to:

{inventory.description} like "*" & {?Search} & "*"

Now it will prompt and it should return the proper data.

-k
 
You guys are the best!!!!! It works!!!! Thank you, thank you!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top