Hi Simona,
Please see if this works:
1) In the @Diff formula, create a variable that keeps adding the number of minutes like a Running Total:
whileprintingrecords;
numbervar mins := mins + DateDiff ("n",{TIMESTARTED} ,{TIMEFINISHED});
DateDiff ("n",{TIMESTARTED} ,{TIMEFINISHED})
2) If you wish to display the Total hours spent in the Report Footer, create another formula (same as @timespent). Instead of using @diff in the code, use the variable name. E,g:
whileprintingrecords;
numbervar mins;
numbervar RemainingMinutes;
numbervar Hours ;
local numbervar Minutes;
//divide the @DateDiff by 3600 to calculate
// hours. Use truncate to remove the decimal portion.
Hours := truncate( mins / 60);
.
.
.
.
-Abhilash