Print Page | Close Window

split field

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2022
Forum Name: Tips and Tricks
Forum Discription: Have you learned some great tricks to share with the group? Post them here!
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=18586
Printed Date: 03 May 2025 at 8:27pm


Topic: split field
Posted By: natali
Subject: split field
Date Posted: 15 Jan 2013 at 6:03am
How can I split a field {GenMaster.GlCode}?
it looks like that  25-000-11-724
thx



Replies:
Posted By: lolly54
Date Posted: 15 Jan 2013 at 1:51pm
You can use the left, right, and mid functions. :)
25 --> left({GenMaster.GlCode}, 2)
000 --> mid({GenMaster.GlCode},4, 3)
11 --> mid ({GenMaster.GlCode},8, 2)
724 --> right ({GenMaster.GlCode},3)

Hope these help... :)


Posted By: natali
Date Posted: 16 Jan 2013 at 3:38am
Thank you very much Lolly,
I tried it. But last three lines were highlighted and I got this message: The remaining text does not appear to be part of the formula.
Then I entered each line as a separate formula and it worked.Tongue
 


Posted By: lolly54
Date Posted: 16 Jan 2013 at 12:40pm
Yea, Natali, they are four different formula.
Glad it worked!


Posted By: natali
Date Posted: 17 Jan 2013 at 3:28am

Thank you again. It helped me a lot.




Print Page | Close Window