Summing certain groups of values on a report

C

ChuckW

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
 
G

Guest

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.
 
G

Guest

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
 
J

John Spencer (MVP)

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))
 

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

Top