More detail:
//LOA ON
IF {PER_HX.ACTION_CODE} IN ["ON LOA", "CHANGE LOA"] THEN {PER_HX.EFFECT_DATE}
//LOA OFF
IF {PER_HX.ACTION_CODE} IN ["ON LOA", "CHANGE LOA"] AND {PER_HX.EMPLOYEE} = Next({PER_HX.EMPLOYEE}) THEN Next({PER_HX.EFFECT_DATE})
//LOA DAYS
SUM(IF {@LOA Off} = Date(0, 0, 0) THEN DateDiff("d", {@LOA On}, CurrentDate) ELSE DateDiff("d", {@LOA On}, {@LOA Off}))
I want to do a SUM of the LOA DAYS field but get "A field is required here.
So, I broke it down to SUM(DateDiff("d", PER_HX.EFFECT_DATE, CurrentDate))
... which is when I get "A field is required here"
The idea is to put the LOA On/Off dates in an Group Header with the number of days an employee was on LOA. The detail then will be a list of course start/end dates and the number of days for that course to indicate whether or not the employee will be eligible for tuition reimbursement.
RSGeek
(currently using Crystal Reports XI with Lawson 8.03)