SteveFairclough
IS-IT--Management
I need to write a report that shows parent records with totals calculated from child records from two different tables. The basic scenario is as follows :-
Claims Sales Purchases
ClaimID ClaimID ClaimID
Name SalesItem PurchaseItem
Address SalesValue PurchaseValue
PostCode
That's just a sample of the tables involved. The relationships are
Claims.ClaimID -> Sales.ClaimID (one to many)
Claims.ClaimID -> Purchases.ClaimID (one to many).
I want to be able to display a simple report showing one Claims record per line with the total of SalesValue and PurchaseValue child records.
There are not always child records in either table. If there was just one child table eg Sales, then I could write the report using a group by ClaimID with sub-totals in the Group Footer. However, as there are two child tables then I'm not sure exactly how to approach the report design. I have tried using sub-reports and shared variables to provide the summary value of SalesValue and PurchaseValue for each Claims record but this makes the report inefficient. I would like to produce these results without using Sub-Reports.
Anybody got any tips on the correct and efficient way to design such a report ?
Thanks in advance for any help provided. Steve Fairclough
I.T. Manager
Claims Sales Purchases
ClaimID ClaimID ClaimID
Name SalesItem PurchaseItem
Address SalesValue PurchaseValue
PostCode
That's just a sample of the tables involved. The relationships are
Claims.ClaimID -> Sales.ClaimID (one to many)
Claims.ClaimID -> Purchases.ClaimID (one to many).
I want to be able to display a simple report showing one Claims record per line with the total of SalesValue and PurchaseValue child records.
There are not always child records in either table. If there was just one child table eg Sales, then I could write the report using a group by ClaimID with sub-totals in the Group Footer. However, as there are two child tables then I'm not sure exactly how to approach the report design. I have tried using sub-reports and shared variables to provide the summary value of SalesValue and PurchaseValue for each Claims record but this makes the report inefficient. I would like to produce these results without using Sub-Reports.
Anybody got any tips on the correct and efficient way to design such a report ?
Thanks in advance for any help provided. Steve Fairclough
I.T. Manager