Solved

parse out string field  in crystal

Posted on 2010-08-31
4
603 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
4 Comments
 
LVL 12

Accepted Solution

by:
JayConverse earned 250 total points
Comment Utility
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
Comment Utility
Or if you just need the state always
This assumes you always have a city and state

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

mlmcc
0
 
LVL 34

Expert Comment

by:James0628
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

762 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now