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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

string evaluation within a field

Status
Not open for further replies.

lareya

Technical User
Jan 30, 2003
49
US
I have a field named {Post Procedure.PROCEDURE_DESC} it is a string w/ legnth 75. I want to make a formula that will look at this string field, and check and see if the word (s)
"colon, colectomy, bowel " are in this field. I would like any of these words to be able to print out on my crystal report.

How do I do this? Right now I have a report with two groups {STAFF.PRIMARY_GROUP} and {Post Case.PROVIDER_SHORT_NAME}
{Post Procedure.PROCEDURE_DESC} is in the detail

It looks like this:
Code:
GenSurg    (group1)
  Dr. Smith (group2)
(Details)
Proc. Desc                Name   Date   Case#  
Lap colon
Nissen
Small bowel Resection
Explor Lap

So all that would show in the report would be
Lap Colon
Small Bowel Resection

thank you very much. See my sig for more info!

Lareya

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Crystal 8.5; ORSOS/One Call Hospital Scheduling System v9.3; SQL database; Huge Newbie to Crystal! Operating Room RN Analyst
 
Try Report->Edit Selection formula->Record:

(
{Post Procedure.PROCEDURE_DESC} like "*colon*"
or
{Post Procedure.PROCEDURE_DESC} like "*colectomy*"
or
{Post Procedure.PROCEDURE_DESC} like "*bowel*"
)

-k
 
Try a record selection formula like:

{Post Procedure.PROCEDURE_DESC} like ["*bowel*","*colon*","*colectomy*"]

-LB
 
LB's is shorter, go with that.

btw, check the Databsae->Show SQL Query to see what it is passing to the database.

-k
 
After testing, it appears that neither suggestion passes to the SQL.

-LB
 
Both do here, LB, and the exact same thing.

<shrug>

I think that your connectivity must be different or some such.

-k
 
Thank you both for the answers!

This works like a charm!

lareya

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Crystal 8.5; ORSOS/One Call Hospital Scheduling System v9.3; SQL database; Huge Newbie to Crystal! Operating Room RN Analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top