Subtotaling Issues

R

Randy K.

I have a passthrough query that returns a recordset that I then group 3
levels in a report. I would like to subtotal several layers and it isn't
totaling correctly (or at least what I want).

Here is a scenario
Recordset:
date1,group1,item2,item3,dollar1,dollar2,5
date1,group1,item2,item5,dollar1,dollar2,10
date1,group1,item3,item27,dollar1,dollar2,25
date1,group2,item2,item30,dollar1,dollar2,50.50
date1,group2,item2,item31,dollar1,dollar2,100

The report is:
Date1:
Group1: Dollar1
Item2: Dollar2
item3 5
item5 10
----
subtotal:15
Item3: Dollar2
item27 25
---
subtotal:25
Group2: Dollar1
Item2: Dollar2
item30 50.50
item31 100
-----
subtotal:150.50

In the above example, the recordset would have returned 15 as the Dollar2
value for Group1,Item2 records and 25 for the group1,item3 record, etc. etc.

I want to put a subtotal under the dollar2 and dollar1 fields at each group
break, but when I use =sum(dollar2), I get 55 instead of 40 since there are
2 group1,item2 records. How can I get it to just sum the 'visible' amounts?

TIA,
Randy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top