Summing certain groups of values on a report

Summing certain groups of values on a report

Post by Chuck » Thu, 28 Oct 2004 23:40:03


Hi,

I am creating an access report on daily credit card
transactions. I have a field called CC_Type which has
values of either AMEX, Master Card or Visa. I have
grouped the report by this field - there is a CC_Type
Header now. Under the details section, the are fields
such as CardNumber, CustomerName, and Amount. In the
CC_Type Footer I have summed by the card type. So all of
the Amex transactions are added together, all of the
Master Card are added together and all of the Visa are
added together. I then have a report footer which give a
daily total and sums all three cards.

What I want to do is in the report_footer or somewhere
else, I want to sum the Master Card and Visa transactions
together. So there will be a Visa/MasterCard sum and
then the daily total. Is there a way to do this?

Thanks,

Chuck
 
 
 

Summing certain groups of values on a report

Post by YnVyZ » Thu, 28 Oct 2004 23:59:15

You can create another query that calculates this total, visa + master card,
and then create a subreport in the report footer of this query. This was the
simplest way i found to solving the problem.

You could try and create a text box that adds the values of the total visa
and the total mastercard text boxes but I couldn't get it to work.

Hope this helps.

 
 
 

Summing certain groups of values on a report

Post by cXVpeG90Z » Fri, 29 Oct 2004 00:25:10

Chuck...could you give us some CC numbers , names and Expiration dates so we
can test this out?....just kidding.

I would give my result text boxes names in the footer...like txtVisa, txtMC.
Then create another textbox and in the data control source do a
"=[txtVisa]+[txtMC]"...something like that may work...you would just have to
play around with it. Hope that works
 
 
 

Summing certain groups of values on a report

Post by MV » Fri, 29 Oct 2004 09:36:16

This is a report problem vice a query problem.

Add an unbound control to the Report Footer (not the page footer)
Set its source to something like

=SUM(IIF(CC_Type = "Visa" or CC_Type = "MasterCard",AmountField,0))