I am designing crystal report with a column having time duration.
I have column like Empcode, name, duration, remarks, etc.
I am grouping report according to empcode.
I want to display sum of duration in group footer.
I have two formulae for that...
@get_seconds :
local stringvar array completetime; local numbervar totalseconds; completetime:=split({DailyAttendance.TotalDuration},":"); totalseconds:= (3600*cdbl(completetime[1])) + (60*cdbl(completetime[2]));
@total_duration :
replace(cstr(Sum ({@get_seconds})\3600),".00","") + ":" + replace(cstr((Sum ({@get_seconds}) mod 3600)/60),".00","")
I am displaying @total_duration in group footer, but i am getting sum of all records in report, not sum of records in group only. Can someone tell me how to achieve this??
Thanks..