Help with Totals in a Report

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!
 
D

Duane Hookom

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")
 
M

Marshall Barton

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")
 

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