Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Splitting a field Post Reply Post New Topic
Author Message
aristeff
Newbie
Newbie


Joined: 09 Feb 2011
Online Status: Offline
Posts: 6
Quote aristeff Replybullet Topic: Splitting a field
    Posted: 19 Jul 2013 at 8:03am

I currently have a text field that I want to separate into three separate values. Please see below:

Field is: 0201752_HY5AJ20

Want to turn into this: 217-52HY and 5AJ2 and 0. The characters were removing would always be in the same location.

Any help would be greatly appreciated.
IP IP Logged
praveeng
Senior Member
Senior Member
Avatar

Joined: 11 Jul 2011
Online Status: Offline
Posts: 165
Quote praveeng Replybullet Posted: 19 Jul 2013 at 8:38am
Hi,
 
Create three formulas and insert the below code
Formula 1
//Below logic will display 2017-52HY
 
mid{Database_Field},,2,4)&"-"& mid({Database_Field},6,2)&mid{Database_Field},,9,2)
 
//Below logic will displau 217-52HY
 
mid{Database_Field},,2,1)&mid{Database_Field},,4,2)&"-"& mid({Database_Field},,6,2)&mid{Database_Field},,9,2)
 
//Below logic will display 5AJ2
 
Mid{Database_Field},,11,4)
 
//Below logic will display 0
Right({Database_Field},1)
 
--Praveen G
Praveen Guntuka,
praveen_guntuka@yahoo.com
IP IP Logged
aristeff
Newbie
Newbie


Joined: 09 Feb 2011
Online Status: Offline
Posts: 6
Quote aristeff Replybullet Posted: 22 Jul 2013 at 2:19am
Thanks Praveen,
I will give this a try.
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.