Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Connecting unlinked records from same table Post Reply Post New Topic
Author Message
Csukardi151
Newbie
Newbie


Joined: 02 Feb 2009
Location: United States
Online Status: Offline
Posts: 8
Quote Csukardi151 Replybullet Topic: Connecting unlinked records from same table
     Posted: 04 Jan 2015 at 11:28am
I'll try to make this short and to the point.

Our db has a table just for our purchase orders. Sometimes we have mistakes on an order and a customer complaint is created. In the process of correcting some complaints, we need to create a new order that will ship the corrected items.

The issue is trying to link the original order to the new order. The two issues I ran into were that 1) I don't know how to link different records together from the same table and 2) the only field that are common in both orders is the PO #.. but there's a catch, the PO # in the corrected order has an "&" in the front.

e.g.
Order      Net      PO
10000      $1000      22222
10001      $1000      33333
10002      $500       &22222

Is it possible to connect order 10002 with order 10000?

Thank you.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Jan 2015 at 4:49am

what do you mean by connect?

if you want to group them (thereby 'connecting them') create a formula to strip out the "&" and group on that formula field
 
//POwithout&
replace(table.POfield,"&","")
IP IP Logged
Csukardi151
Newbie
Newbie


Joined: 02 Feb 2009
Location: United States
Online Status: Offline
Posts: 8
Quote Csukardi151 Replybullet Posted: 05 Jan 2015 at 5:11am
Thanks for the reply.

I want to have all orders grouped in GH1 and have their corresponding order (that contains the & in the PO) listed underneath, either by GH2 or a sub group?

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Jan 2015 at 5:15am

group on the formula that strips out the "&" then a second grouping on the original PO field

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