Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9091

Re: Sumarizing calculated field

$
0
0

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

 


Viewing all articles
Browse latest Browse all 9091

Trending Articles