Solved

parse out string field  in crystal

Posted on 2010-08-31
4
613 Views
Last Modified: 2012-06-21
I have a string field that holds city, state zip I need to parse out state for a crystal reprot
0
Comment
Question by:patsylipp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 12

Accepted Solution

by:
JayConverse earned 250 total points
ID: 33572569
Press F1 and take a look at the Split() function.  Assuming consistent formatting of the data, i.e.,

city{COMMA}{SPACE}state{space}zip

You would split once on ", " and take the second array element

then split again on " " and take the first array element

0
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 250 total points
ID: 33572980
Or if you just need the state always
This assumes you always have a city and state

Split({YourField}," ")[2]

mlmcc
0
 
LVL 35

Expert Comment

by:James0628
ID: 33574109
mlmcc,

 That won't work so well with city names that are 2 or more words.  But, then again, what are the odds of that happening?  ;-)

 James
0
 
LVL 19

Expert Comment

by:GJParker
ID: 33574598
It woudl be far simpler to help you if you at least provided a sample of your data format rather than having to guess.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question