Re: Report Designer in Payroll
Posted: 15 Jan 2014, 17:42
The Bonus and Overtime are not fields, they are payment types.
You need to consider you could have several different payment types all of which are overtime, you could also have several that are Bonuses.
So the Data could look like
Payment for period
Paytype 1 (STD hours) Hrs, Amount
Paytype 7 (Overtime Week) Hrs Amount
Paytype 3 (Overtime W/E) Hrs Amount
Paytype 6 (Bonus) Hrs Amount
You would need to hide the details section and in the footer section add up the values for all the paytypes.
In the (hidden) details section you need to have an expression to calculate the Overtime Amount, the Std Amount and the Bonus Amount
So you will need to use some criteria,
if the pay type is 3 or 7 the overtime field is the value of the amount paid otherwise 0
if the pay type is 6 the bonus field is the value of the amount paid otherwise 0
if the pay type is not 3,6 or 7 the standard field is the value of the amount paid otherwise 0
In the footer you total the Overtime Std and Bonus for that employee and you have whay yo want.
Note this will break when someone adds a new paytype (8 Bank holiday overtime) as the report will put 8 into Std
You need to consider you could have several different payment types all of which are overtime, you could also have several that are Bonuses.
So the Data could look like
Payment for period
Paytype 1 (STD hours) Hrs, Amount
Paytype 7 (Overtime Week) Hrs Amount
Paytype 3 (Overtime W/E) Hrs Amount
Paytype 6 (Bonus) Hrs Amount
You would need to hide the details section and in the footer section add up the values for all the paytypes.
In the (hidden) details section you need to have an expression to calculate the Overtime Amount, the Std Amount and the Bonus Amount
So you will need to use some criteria,
if the pay type is 3 or 7 the overtime field is the value of the amount paid otherwise 0
if the pay type is 6 the bonus field is the value of the amount paid otherwise 0
if the pay type is not 3,6 or 7 the standard field is the value of the amount paid otherwise 0
In the footer you total the Overtime Std and Bonus for that employee and you have whay yo want.
Note this will break when someone adds a new paytype (8 Bank holiday overtime) as the report will put 8 into Std