Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum of a Calculated Field

Status
Not open for further replies.

LearnersPermit

Technical User
May 30, 2001
70
CA
I have a fleet db that I'm making changes to. We plan to start charging a sliding rate for each type of vehicle (cars, trucks and vans). I have a report that displays the distance travelled x the rate for that type of vehicle. My problems is that I'm unable to provide a sum of the calculated field.

The calculation of the mileage for each vehicle is =Sum([KMs_Travelled])*([rate]).

When I try to sum this calculation I either get the total kms travelled or the last calculation ($22.50).

Supervisor Km's Travelled Rate Total Per Trip
Al 2500 0.55 $1,375
Dan 50 0.45 $ 22.50

Grand Total 2,550 ??????

The line Grand Total is in the report footer. I'm just not sure how to total the Total Per Trip column.

Thank you for any help.
 
I think I would calculate the Total per trip in the query, just do

TotalTrip: [KMs_Travelled]*[rate]

in the query, then you can sum the TotalTrip after you've added it to the report.


Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top