Subtotal based on criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report listing numerous payments. If the payments happened on the
same date, for the same client, I would like the report to subtotal them.

ie. if client=client and paymentdate=paymentdate, then subtotal.

How can I do this?

THANKS!
 
CarrieStory said:
I have a report listing numerous payments. If the payments happened on the
same date, for the same client, I would like the report to subtotal them.

ie. if client=client and paymentdate=paymentdate, then subtotal.


Subtotals are best dealt with by adding a group on the date
field. Then the group footer section can just use a text
box with the Sum function.
 
Thanks Marshall.

Should I then add a group for the date and a group for the client? Then can
I write a sum formula only if there is more than one record in the group?

Thanks!
 
You probalbly already have a group for Client. Add another
group (with group footer) under that for the date field.

Then just add a text box to the new group footer and use the
expression:
=Sum(paymentfield)

If you want to suppress the group footer when there is only
one detail in the group, add another text box (name it
txtGrpCnt) with the expression =Count(*) to the group
footer. The add a line of code to the group footer's Format
event:
Cancel = (txtGrpCnt <= 1)
 
Back
Top