how to add subtotals to a report?

C

Carter Johnson

I have Microsoft Access report that shows the following type of data:

Name Date Amount
Jane 1/4/03 50.00
Jane 1/5/03 60.00
Jane 1/8/03 70.00
Jane 2/4/03 20.00
Jane 2/5/03 30.00
Jane 3/8/03 40.00
Jane Total 270.00

How can I program the report so that it subtotals by month. For example,
the report will show January Subtotal = 180, February Subtotal = 90.
 
A

Allen Browne

1. Open the report in design view.

2. Open the Sorting And Grouping dialog (View menu).

3. In the top of the dialog, enter the name of your date field.

4. In the bottom of the dialog, set these properties:
Group Footer Yes
Group On Month
Access adds a group footer section to your report.

5. In the group footer section, add a text box with these properties:
Control Source =Sum([Amount])
Format Currency

Hopefully the names "Name" and "Date" are example only: both will cause
problems if you really have fields with those names.
 
J

John Vinson

I have Microsoft Access report that shows the following type of data:

Name Date Amount
Jane 1/4/03 50.00
Jane 1/5/03 60.00
Jane 1/8/03 70.00
Jane 2/4/03 20.00
Jane 2/5/03 30.00
Jane 3/8/03 40.00
Jane Total 270.00

How can I program the report so that it subtotals by month. For example,
the report will show January Subtotal = 180, February Subtotal = 90.

Add a calculate field to the Query upon which the report is based by
typing:

SaleMonth: Month([Date])

Use SaleMonth in the Report's Sorting and Grouping dialog (right
mouseclick the little square at the upper left in design view), and
put in a section Footer for SaleMonth. In that footer put a textbox
with a Control Source

=Sum([Amount])

and it will sum over that month's data.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 

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