Help with Totals in a Report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I had a total field in some Reports with this formula:
=(DateDiff("n",[StartLunch],[EndLunch]))\60 &
Format((DateDiff("n",[time1],[time2])) Mod 60,"\:00")
The detail report show:
ID: 123 Service: VISA Time1: 8:13 Time2: 9:27 Total time shows: 1:14
ID: 456 Service: VISA Time1: 9:04 Time2: 9:27 Total time shows: 0:23
This is perfect, but the summary shows:
Service: VISA Time1: 8:13 Time2: 9:27 Total time shows: 1:14 (Which is
the information for the firts field in the table with this service. How can
I have the Total field to show the sum for all the total fields? In this
case should be 1:37 instead of 1:14.
Help me masters!
 
Try this expression in a group or report footer section:

=Sum(DateDiff("n",[StartLunch],[EndLunch]))\60 &
Format(Sum(DateDiff("n",[time1],[time2])) Mod 60,"\:00")
 
jeannette_rivera said:
I had a total field in some Reports with this formula:
=(DateDiff("n",[StartLunch],[EndLunch]))\60 &
Format((DateDiff("n",[time1],[time2])) Mod 60,"\:00")
The detail report show:
ID: 123 Service: VISA Time1: 8:13 Time2: 9:27 Total time shows: 1:14
ID: 456 Service: VISA Time1: 9:04 Time2: 9:27 Total time shows: 0:23
This is perfect, but the summary shows:
Service: VISA Time1: 8:13 Time2: 9:27 Total time shows: 1:14 (Which is
the information for the firts field in the table with this service. How can
I have the Total field to show the sum for all the total fields? In this
case should be 1:37 instead of 1:14.


It would probably be better to have the DateDiff as a
calculated field in the report's record source query.

To calculate it in the report footer text box:
=Sum(DateDiff("n",[StartLunch],[EndLunch]))\60 &
Format(Sum(DateDiff("n",[time1],[time2])) Mod 60,"\:00")
 
Back
Top