Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'im trying to calculate a sum of workedhours:
@TotalWorkedHours:
numbervar fin_t := {@SumTotalSec2WithoutGroup};
NumberVar Hours   := Truncate (fin_t/3600);
NumberVar Minutes := Truncate (Remainder (fin_t,3600)/60);
NumberVar Seconds := Remainder (fin_t,60) ;
Totext (Hours,0,"") + ':'+ Totext (Minutes,0,"") + ':' + Totext(Seconds,0,"")


@SumTotalSec2WithoutGroup: I get a problem here "This field cannot be summarized"
SUM({@TotalSecAchivedHour})


@TotalSecAchivedHour:
local stringvar array completetime;
local numbervar totalseconds;
completetime:=split({@achievedworkedhours},":");
totalseconds:= (3600*cdbl(completetime[1]))
 + (60*cdbl(completetime[2]))
;


@achievedworkedhours: Time value with string type (hh:mm)
if IsNull({@PermissionHoursInTime})
then {@SumWorkedHours}
else {@TotalHoursWithPermission}



I get A proble in the formula "@SumTotalSec2WithoutGroup" :
error message : "This field cannot be summarized"
Any help please ?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900