This is a bit long winded, but I hopeyou get the gist of it
Basically I'm trying to find the potential of workers by saying that if the day is a working day, then the worker can work 8 hours.
I have to do a sum on the following exprssion
=((COUNT(Fields!date.Value) - (COUNT(iif(Fields!Day_Type.Value = "Weekend", Fields!Day_Type.Value, iif(Fields!Description.Value =Nothing, Nothing,Fields!Description.Value))))) * 8))Obviously, I can't use runing aggregation, so I read that I can use custom code for this task, using this to get the total, which is
Public Function AddTotal(ByVal potential AS integer) AS integer Dim totalPotential As integer totalPotential = (totalPotential + potential) return totalPotential End Function
I then put the expression as in the argument for the addTotal function.
Problem is I am getting the figure I would get if I just put the above expression in there. does anybody know why this is?