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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mileage calculations

Status
Not open for further replies.

pomster

Technical User
Jan 15, 2003
88
AU
I need to report similar to a vehicle log book where you fill in the odometer reading daily, not distance travelled. At the end of the month I total the km travelled using maxread - min read. Quite simple really..

I also have a second and third vehicle that I do the same for.

How do I get a sum of all reads for all vehicles?

I hope I haven't over simplified things.

I cannot seem to get it to work.


Any ideas??



regards,


David

CRXIR2 with CRXIR2 server and SQL 2005
 
If you group by vehicle, you can use summary totals for minimum and maximum for that vehicle. If I've understood you, that should give you the total for that vehicle.

The problem is adding those values. I think you could get that by
a) Use a Formula Field to get the difference, as a Variable, maybe called OneVehicleTotal.
b) Use another field caled AllVehicleTotal, use it to accumulate values of OneVehicleTotal.

Try it and see how it works. Display all of the values while developing, tidy them away once it works OK.

Use SEARCH if you need details about using Variables in Formula Fields. If you're not already familiar with Crystal's automated totals, see FAQ767-6524.


[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top