I have a table set up with a repair order, the cost, date, and unit of that order. It is in a one-to-many relationship with a table holding the repair details.
My resulting query returns something like the following
Unit Month Order # Cost Repair description
1 10 100 $100.00 Oil Filter
1 10 100 $100.00 Air Filter
1 10 100 $100.00 Engine
2 11 101 $250.00 Oil Filter
2 11 101 $250.00 Tires
....
and so on.
Now, in my report, it is grouped first by Unit, then Month, then repair order, then repait description. This works and look lovely, but I cannot get it to sum the costs for the unit for that month.
Putting Sum([Costs]) in the unit footer adds up everything (all the duplicate $100.00s for example), so I figured just putting running sums in one of the headers or footers would do it, but nothing so far.
Any suggestions? Maybe redesigning the query somehow?
My resulting query returns something like the following
Unit Month Order # Cost Repair description
1 10 100 $100.00 Oil Filter
1 10 100 $100.00 Air Filter
1 10 100 $100.00 Engine
2 11 101 $250.00 Oil Filter
2 11 101 $250.00 Tires
....
and so on.
Now, in my report, it is grouped first by Unit, then Month, then repair order, then repait description. This works and look lovely, but I cannot get it to sum the costs for the unit for that month.
Putting Sum([Costs]) in the unit footer adds up everything (all the duplicate $100.00s for example), so I figured just putting running sums in one of the headers or footers would do it, but nothing so far.
Any suggestions? Maybe redesigning the query somehow?