Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Split Elements of Concatenated String Post Reply Post New Topic
Author Message
ryan180
Newbie
Newbie


Joined: 28 Jan 2013
Location: United Kingdom
Online Status: Offline
Posts: 2
Quote ryan180 Replybullet Topic: Split Elements of Concatenated String
     Posted: 28 Jan 2013 at 9:17am
I have a report which extracts an already-concatenated string of around 9 database fields, each separated by a colon. I've been tasked with separating this string out into the original fields using a formula, but I'm struggling!

Example Field

{01/01/2012: Example: 130.00: 240.00: 100.00: Y: N: Y: Y}

Example (desired) Output

{01/01/2012} {Example} {130.00} {240.00} {100.00} {Y} {N} {Y} {Y}

Any assistance with a formula which would achieve the above would be much appreciated!
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 28 Jan 2013 at 6:01pm
Hi

You need to use Split() function to extract the values ..

Try this :

Split("01/01/2012: Example: 130.00: 240.00: 100.00: Y: N: Y: Y",':')[1]

[1] extracts first value [2] will extract second value so on..
Thanks,
Sastry
IP IP Logged
ryan180
Newbie
Newbie


Joined: 28 Jan 2013
Location: United Kingdom
Online Status: Offline
Posts: 2
Quote ryan180 Replybullet Posted: 28 Jan 2013 at 10:13pm
Thanks - that works perfectly
IP IP Logged
Printable version Printable version

Forum Jump
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