|
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
|