CR v8.5
I have a formula ({@Training Days}) that calculates training days based on the number of attendees and the duration of the course. This works fine
I also have the report grouped by Trainer Reference and by Course Ref so that I can see the training days for each course that the trainer has trained. I currently have a formula to calculate the training days for each Course Ref, but I need to be able to sum these training days to get a sum for all the trainer's courses in the Trainer Ref group. The formula's I currently have are below and are all in the Course Ref group along with any appropriate subreports.
I have a formula ({@Training Days}) that calculates training days based on the number of attendees and the duration of the course. This works fine
I also have the report grouped by Trainer Reference and by Course Ref so that I can see the training days for each course that the trainer has trained. I currently have a formula to calculate the training days for each Course Ref, but I need to be able to sum these training days to get a sum for all the trainer's courses in the Trainer Ref group. The formula's I currently have are below and are all in the Course Ref group along with any appropriate subreports.
Code:
[b]{@days}[/b] =
datediff("d",{EVENT.STARTTIME},{EVENT.FINISHTIME})
[b]{@hours}[/b] =
if ((datediff("h",",{EVENT.STARTTIME},{EVENT.FINISHTIME})/24) <=0.13) then 0.5
else 1
[b]{@MainFormula(Attended)}[/b] =
WhilePrintingRecords;
Shared NumberVar EmployeeCount;
EmployeeCount;
[b]{@Training Days}[/b]
if {EVENT.COMPLETED} = "T" then ({@days}+{@hours})*{@MainFormula(Attended)}
else 0