Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Formula Field/Sub Report Question Post Reply Post New Topic
<< Prev  Page  of 2
Author Message
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Mar 2013 at 6:46am
first keep in mind that I am 'guessing' at the set up based on your description and generic DB concepts so i can be off base.
I think I was assuming that you had in your PO (gpo?) table two fields where you could assign a PO vendor and a PO payee independently. On rereading it sounds like that is not the case.
Instead you have only one vendor per PO but that vendor may be linked to the another vendor as a payee.
So in your report inner join (link) the vendor to the po on the vendorID
Make sure that is working fine and that you get all of the PO's with the correct vendors showing.
Now add the vendor table again, vendor_1 and outer join it to vendors.
Link it on the vendor on the fields that indicates one vendor is a payy of another vendor, likely vendor.paytovendorkey=vendor_1.vendorkey
 
IP IP Logged
pjewett
Newbie
Newbie


Joined: 22 Mar 2013
Online Status: Offline
Posts: 8
Quote pjewett Replybullet Posted: 25 Mar 2013 at 7:31am
Understood..I appreciate your patience.

Firstly let me say BINGO. That worked. Read the below only as an FYI if you're interested.  THANK YOU SO MUCH for hanging with me on this. Going to go over it all in my head thoroughly so I'm sure I've ingested the concept you've shown me here.



1. Much (but not all) of the information pulled into our Crystal PO comes from our PO table (dbo.gpo) and this includes the vendor name, address, etc that you see at the top of the image I provided of a PO (Rockpool Children's Books LTD). Our production managers in creating the PO in the 3rd Party App add the "Vendor" among other things and that vendor's info is pulled behind the scenes from the dbo.vendor table to populate the po record in dbo.gpo.

They do NOT assign a Payee vendor in this process.  Rather when a Vendor is first setup in this 3rd Party system there's an optional pop-up next to "Payee Vendor" that allows one to choose another vendor in the system to be the "Payee" vendor for that vendor.

So a vendor that during setup is assigned a "Payee" vendor get's a unique vendorkey (as all vendors) and gets a value in dbo.vendor.paytovendor which is the vendorkey of another vendor...the payee.

As this Crystal PO exists originally with no changes it populates the vendor info (see image) from the gpo.vendorname, gpo.vendoraddress, etc. 

The dbo.vendor table itself is not in the original working copy of this crystal report. (Remember the gpo (PO) record that was generated in the 3rd party app grabbed vendor info from dbo.vendor behind the scenes to create the gpo record that includes the "primary" vendor info.

I thought I was trying to reference that vendorkey in the gpo record of a given PO in the newly added dbo.vendor table to see if it has a value in dbo.vendor.paytovendorkey and if it does then display the name, address, etc of that vendor. Remembering that the paytovendorkey will match with a vendorkey.





 
IP IP Logged
<< Prev  Page  of 2
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