I am working in Crystal Reports connecting to an SQL database.
When calculating sick time you take the total hours worked and divide it by 30 to get sick time. The issue is if the employee does not work a week then their total hours start all over again.
Group 1 is Employee
Group 2 is Payroll End date
Data looks like this
Dan
1/1/23 20
1/8/23 20
1/22/23 20
1/29/23 20
Ann
1/1/23 10
1/8/23 10
1/15/23 10
1/22/23 10
1/29/23 10
Betty
1/1/23 10
1/15/23 10
1/29/23 10
For Dan he has 2 dates in a row then he misses a week and would have to start his total hours again so his total hours would be 40.
Total hours is reset for the next employee.
Ann worked each week so she would have a total of 50 hours.
Betty would have a total of 10 hours because she only worked every other week. Her total would reset each time she missed a week.
Any suggestion how I can calculate total hours?
When calculating sick time you take the total hours worked and divide it by 30 to get sick time. The issue is if the employee does not work a week then their total hours start all over again.
Group 1 is Employee
Group 2 is Payroll End date
Data looks like this
Dan
1/1/23 20
1/8/23 20
1/22/23 20
1/29/23 20
Ann
1/1/23 10
1/8/23 10
1/15/23 10
1/22/23 10
1/29/23 10
Betty
1/1/23 10
1/15/23 10
1/29/23 10
For Dan he has 2 dates in a row then he misses a week and would have to start his total hours again so his total hours would be 40.
Total hours is reset for the next employee.
Ann worked each week so she would have a total of 50 hours.
Betty would have a total of 10 hours because she only worked every other week. Her total would reset each time she missed a week.
Any suggestion how I can calculate total hours?