April 22, 2015 at 4:29 pm
Hello,
In my report, I grouped my report by pools. Inside each pool, I use an expression to calculate the expenditure for each client. The expression is like:
=Variables!gwksaf630.Value * (Variables!gEncu.Value/Variables!gtotalwksTrng.value).
The value is stored in Textbox40. It is working fine.
Then I use the following code to calculate the total expenditure (Sum) for each pool.
********************************
dim public totaltextbox40 as Decimal
Public Function AddTotal(ByVal textbox40 AS Decimal ) AS Decimal
totaltextbox40 = totaltextbox40 + textbox40
return textbox40
End Function
Public Function GetTotal()
return totaltextbox40
End Function
************************************
For Pool Sum, I write expression like =Code.GetTotal()
However, the return value is 0 for each pool.
Are there any way to work out?
Please help.
May 1, 2015 at 2:15 am
How are you calling AddTotal?
May 1, 2015 at 12:36 pm
=code.AddTotal(ReportItems!textbox40.value)
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply