I need to sum values from a textbox into textbox groups in SSRS. I learned that I need use Custome code and expression in footer texbox. I get right result in Group Worker (Textbox218) , but i get wrong result in second Group Workplace (Textbox276 ). Look at the picture below:
Expression in each Texboxes:
expression in Textbox289: =Code.GetValue(ReportItems!Textbox217.Value) - its OK
expression in Textbox218 (Group Worker): =formatnumber(Code.GetTotal(ReportItems!Textbox289.Value),1) & Code.ResetTotal(ReportItems!Textbox289.Value) - its OK
expression in Textbox276 (Group Workplace) =formatnumber(Code.GetTotal(ReportItems!Textbox218.Value),1) - the result is NOT OK. I get result ZERO, but I need result 18 (8,7 + 9,3)
Can any good soul give me some advice? Unfortunately, I dont know VBA very well. Its possible, for example, put a condition on the name of the textbox in the Custome code? Or some better solution? Thank you very much.
CUSTOME CODE:
Public Shared Value as decimal=1
Public Shared Function GetValue(Item as decimal) as decimal
value = value + item
return item
End Function
Public Shared Function GetTotal(item)
return value
End Function
Public Shared Function ResetTotal(item)
value = 0
End Function
