Calculating totals in a report

G

Guest

I have a report that I am using records from 3 files, 1.customer 2. vehicle and 3. options. I want to summarize by customer the total of all vehicles purchased and the options selected for each vehicle and show it in a total field. My problem is I have to put the cost of the vehicle in a header so that it does not print each time there is an option associated with it. The detail section contains the values of the options. I can easily summarize each vehicle by stating
=sum([optioncost]) + vehiclecost. and get the correct total for each vehicle
My problem is I can't get the totals by customer. When I use the same statement it adds all of the options for the customer but only the value of the last vehicle. When I change the statement to sum the vehicle cost it then gives me a figure that I have no clue how it calculated. Can I sum header fields and detail fields to obtain a grand total? How would I do this? Any help you can give is really appreciated!
 
M

Marshall Barton

Macy said:
I have a report that I am using records from 3 files, 1.customer 2. vehicle and 3. options. I want to summarize by customer the total of all vehicles purchased and the options selected for each vehicle and show it in a total field. My problem is I have to put the cost of the vehicle in a header so that it does not print each time there is an option associated with it. The detail section contains the values of the options. I can easily summarize each vehicle by stating
=sum([optioncost]) + vehiclecost. and get the correct total for each vehicle.
My problem is I can't get the totals by customer. When I use the same statement it adds all of the options for the customer but only the value of the last vehicle. When I change the statement to sum the vehicle cost it then gives me a figure that I have no clue how it calculated. Can I sum header fields and detail fields to obtain a grand total? How would I do this? Any help you can give is really appreciated!


Let's say your total text box in the vehicle footer section
(with the expression =sum([optioncost]) + vehiclecost) is
named txtVehicleTotal.

First add hidden text box named txtRunCustomerTotal to the
footer section. Set its control source expression to
=txtVehicleTotal and its RunningSum property to Over Group.

Then the Customer footer section can use a text box with the
expression =txtRunCustomerTotal to display the cistomer
total.
 
G

Guest

Marshall
Thanks so much, I was so close and yet so far away
That worked perfectly
 

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