Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Combining tables and getting rid of duplications Post Reply Post New Topic
Author Message
Johann
Newbie
Newbie
Avatar

Joined: 24 Feb 2013
Location: South Africa
Online Status: Offline
Posts: 1
Quote Johann Replybullet Topic: Combining tables and getting rid of duplications
     Posted: 25 Feb 2013 at 10:44am
Hi all,

I need some help compiling a report please. It is such a simple report but I just can’t get it right.
I need to show all Goods Receipt PO and Goods Return transactions per Vendor in a date range combined into one column ‘Value’ with two columns ‘VAT’ and ‘Total Value’.
Dates entered by user as parameters StartDate and EndDate.
I’m listing OCRD.CardName with OPDN.DocTotal and VatSum in the details section and then grouping by CardName to give me totals per Vendor. So far so good.
As soon as I drop in ORPD.DocTotal and VatSum to obtain the Returns data I experience some problems. For the total amount of ORPD transactions per Vendor I will get as many duplicated OPDN transactions. It is running through all ORPD transactions to obtain the OPDN necessary info.
Supressing them doesn’t help, they are still included in the totals. How do I pass the Date parameters to the ORPD table and only get 1 distinct set of results?
I’ve tried all JOIN combinations. I’ve tried to use a subreport to determine the ORPD info but not sure how to use the totals in main report with OPDN values in calculations.
Supplier     Value     VAT     Tot Value                    
Alfa     10     1.14     11.14                    
Andy     20     2.28     22.28                    
Arysta     15     1.61     16.61                    
                                   
Supplier     Value     VAT     Tot Value     Returns     VAT     Tot Value     
Alfa     10     1.14     11.14                    
Andy     20     2.28     22.28                    
Andy     20     2.28     22.28     5     0.57     5.57     (2 returns in supplier history, only 1 for selected date)
Arysta     15     1.61     16.61                    

I hope somebody understands what I’m trying to say and can help.

Thanks,
Johann
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 26 Feb 2013 at 12:30am
Hi

Sub report is the best solution for this scenario.

Main report :

Create only with Goods Receipt PO information .

--Insert a group on Supplier and insert all your totals in group footer.

Create one more report with Goods Return informaiton

--Insert a group on Supplier and place your totals on group footer.

Now place your sub report in group footer of your main report.
--Right click on your sub report and click on"Chase Sub report Links" and link main report supplier with sub report supplier.

This will give you only one row for both goods receipt and goods returns.

Thanks,
Sastry
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