Link to home
Start Free TrialLog in
Avatar of mike-9
mike-9

asked on

Manipulating string data in Crystal reports

Hello all,

I need some help with a Crystal formula on a string.

I have a string of data I want to manipulate. In Crystal that looks like this:
"ACCT_NBR=123456|iD_NUM=123456"

i want to just pull out the acct_nbr field.  It will always start after the equals sign at the 12th character.  The field length could be 4 to 6 characters then ends with the pipe.

What is the correct function to just pull out the acct_nbr?  I was messing around with a few but could not get it quite right.
ASKER CERTIFIED SOLUTION
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mike-9
mike-9

ASKER

You are right about the 10th position in the above post.  I left out a few unneeded characters from data I was working with for simplification.  

Thanks for the tip. That definitely did what was needed.  

I think I found another way to do the same thing from browsing around the site.  

tonumber(Mid(Split({table.field},"|")[1],12))

Thanks again for the quick response!
Avatar of mike-9

ASKER

Exactly what I was looking for.