Print Page | Close Window

Need help quickly with Trim question!!

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=766
Printed Date: 07 May 2024 at 4:14pm


Topic: Need help quickly with Trim question!!
Posted By: ChrisJ517
Subject: Need help quickly with Trim question!!
Date Posted: 30 May 2007 at 11:22am
I have a string field that has certain data I need to extract.  For example, every entry in the field looks like this:
 
F/F (oc: Scott)
DC (oc: Bob)
Form Product (oc:Joe)
Professional Services (oc: Bill)
 
 
I need to know how I can get everything before the first ( to display on the report.  Is this a Trim function?
 
Please help!



Replies:
Posted By: BrianBischof
Date Posted: 30 May 2007 at 2:05pm
here you go.
x := Left({table.field}, Instr({table.field},"(")-1);


-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>



Print Page | Close Window