March 20, 2019 at 5:04 pm
Hello Everyone,
I have a custom code to add up a field to get the sum.
When I call function '=code.GetTotal()', I can get correct numbers. The only question is when
I use =code.GetTotal() - Fields!PAYMENTAMT.Value, then the =code.GetTotal() reset to 0.
I think in the Public Function GetTotal(), I reset totaltextbox33 = 0. Maybe that is the reason.
But I cannot figure out.
Please help!
Thank you very much
*******************************************************
public shared Dim totaltextbox33 as Decimal
public shared function Initialized()
totaltextbox33 = 0
End Function
Public Function AddTotal(ByVal textbox33 AS Decimal ) AS Decimal
totaltextbox33 = totaltextbox33 + textbox33
return totaltextbox33
End Function
Public Function GetTotal()
dim ret as Decimal = totaltextbox33
totaltextbox33 = 0
return ret
End Function
*************************************************************************************
Viewing 0 posts
You must be logged in to reply to this topic. Login to reply