Home
Crystal Reports Training
Crystal Reports XI
Crystal Reports .NET
Crystal Reports Forum
News
Tech Support
Active Topics
Memberlist
Search
Help
Register
Login
Technical Questions
Crystal Reports Forum
:
Crystal Reports 9 through 2022
:
Technical Questions
Topic: How to extract a string?
Author
Message
gilfong
Newbie
Joined: 24 Sep 2008
Location: United States
Online Status: Offline
Posts: 1
Topic: How to extract a string?
Posted: 24 Sep 2008 at 10:48am
Example of the data:
Progesterone Receptor (SP2)
Keratin 19 Rabbit PAb
CD22
How do I extract the 1st and 2nd word?
IP Logged
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Posted: 24 Sep 2008 at 12:50pm
There may be a more "elegant" way to do this, but try something like this:
NumberVar x;
x := InStr({table.field}, " "); //get the position of the first space
x := InStr(x, {table.field}, " "); //get the position of the second space
Left({table.field}, x-1)
Note that there is no semi-colon after the last statement.
-Dell
Proviti, Data & Analytics Practice
www.protiviti.com/US-en/data-management-advanced-analytics
IP Logged
Printable version
Forum Jump
-- Select Forum --
Announcements
Talk with the Author
Self-Publishing
Job Postings
New feature request
Report Design
Data Connectivity
Technical Questions
Tips and Tricks
Crystal Xcelsius
Report Design
Data Connectivity
Writing Code
Tips and Tricks
Report Design
Data Connectivity
Writing Code
Tips and Tricks
You
cannot
post new topics in this forum
You
cannot
reply to topics in this forum
You
cannot
delete your posts in this forum
You
cannot
edit your posts in this forum
You
cannot
create polls in this forum
You
cannot
vote in polls in this forum
HOME
|
FREE EBOOK
|
PROGRAMMING GUIDE
|
PURCHASE
|
REVIEWS
|
CONTACT ME
|
FAQ
|
LINKS
|
PRIVACY
|
CLICK PLAYS
|
BAEZL
© 2004-2026 Brian Bischof. All Rights Reserved.