March 17, 2015 at 2:48 pm
Hello,
In my report, I group my report by pools. For 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 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
************************************
However, the return value is 0 for each pool.
Please help.
April 9, 2015 at 9:39 am
I don't do a lot of with the "Code" part of SSRS so this is just a guess.
your line totaltextbox40 = totaltextbox40 + textbox40 references report objects. you might have to reference using the ReportItems Collection.
reportitems!totaltextbox40.value = reportitems!totaltextbox40.Value + reportitems!textbox40.Value
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply