Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: splitting field into gropus Post Reply Post New Topic
Author Message
will_n
Newbie
Newbie


Joined: 19 Apr 2011
Online Status: Offline
Posts: 2
Quote will_n Replybullet Topic: splitting field into gropus
     Posted: 19 Apr 2011 at 8:55am
I am trying to split a text data field into individual groups.
 
Data field: PODetails.Reference1
Example Data1: 37452, 40337, stock
Example Data2: 37452
Example Data3: 34451, 39953, 40125
 
The PODetails.Reference1 field tracks where the purchased item goes after receipt - the reference number is a work order. Below is the PO line
 
Item     Description       Qty      Price      Reference1
abc       widget              6         $0.75     37452, 40337, stock
xyz       nut                    2         $0.10     37452
 
In this case a widget and a 2 nuts go to work order 37452, and 1 widget goes to 40337 with the rest going to stock.
 
I need to be able to separate the Reference1 field into groups so I can see what is outstanding by work order as below.
 
WO 37452
Item     Description             
abc       widget                 
xyz       nut
 
WO 40337
Item     Description
abc       widget
 
Stock 
Item   Description
abc     widget
 
 
How can I strip them apart. Split function gets me started, but I cant seem to finish.
 
Thanks.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Apr 2011 at 9:05am
split won't do it beacuse you need a row per instance. Splitting only leaves the one row.
Can you address this outside of crystal from your source?
IP IP Logged
will_n
Newbie
Newbie


Joined: 19 Apr 2011
Online Status: Offline
Posts: 2
Quote will_n Replybullet Posted: 19 Apr 2011 at 9:14am
not really. would have to enter 1 line item per part per work order. my purchasing guy would kill me, as would my receiving vendors.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Apr 2011 at 9:29am

not necessarily changing your entry process but rather your data extraction process. Can you build in a view or stored proc for your source?

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