I am looking to produce a report which would have a column for Tutor name, a column for class code (i.e. the name of the class) and then a column for each day in the date range specified through variables when the report is generated. I need the columns for each day to contain the sum of the duration (in minutes) for that class on that day. I don't know if we could have the columns dynamically generated but having blank columns on the end is fine. I thought perhaps an if based on the start date variable + so many days unless greater than the end date? I currently have a report which will give me the total minutes for the entire date range, the code looks like this:
a:=Event.Weeks.List.Date; b:=Event.Duration.Mins; sumlist(apply(a,v,if((date(v) >= Date(Var('StartDate'))) and (date(v) <= Date(Var('EndDate'))),intplus(getat(b,applyposn)),0)))
I myself don't really understand what's going on here, I'm not sure what 'apply' does in the code nor where the 'v' comes from, 'inplus' is also a mystery along with 'applyposn'. Unfortunately, I can't get hold of the person who originally wrote the code above.
Does anyone have any ideas how I might achieve this?
Many thanks.
Emma