Skip to Content
Former Member
May 01, 2018 at 11:19 AM

How to calculate the sum of Formula Fields


I m using crystal reports and i have varchar(500) columns which saves date and time for employees like checking in and checking out time , so i want the difference of checkout-checkin so i wrote that below formule

"NumberVar TotalSec := Time({zz_tbl_Report_New_Format.MondayOut}) - Time({zz_tbl_Report_New_Format.MondayIn}); NumberVar Hours := Truncate ( TotalSec / 3600); NumberVar Minutes := Truncate (Remainder ( TotalSec,3600) / 60); Totext ( Hours, '####') + ':'+ Totext ( Minutes,'00');"

it finds the difference correctly now at the end i want to add up all these rows and show the sum how can i achive that .check the attachement for more clarification


report.png (43.2 kB)