Hi,
I am working on a report and in one of the fields is
=(ReportItems!Textbox1.value-ReportItems!Textbox2.value)
/(ReportItems!Textbox1.value+ReportItems!Textbox2.value)
which is the division of previous 2 fields and if i have any values for these fields then i get the correct value,but if i dont have any values for the previous 2 fields i mean if they are empty then it returns me #ERROR.
So finally i used VB.Net code like below
Public Shared Function VarPercent(ByVal Actual As Decimal, ByVal Budget As Decimal) As Decimal
If Budget = 0 Then
Return 0
End If
Return (Actual / Budget)
End Function
Use Expression as below
=code.varpercent(ReportItems!Textbox1.value-ReportItems!Textbox2.value)
/(ReportItems!Textbox1.value+ReportItems!Textbox2.value) its worked nicely.
See My problem is When i try to add SUM of fields like below,
=code.varpercent(sum(ReportItems!Textbox1.value-ReportItems!Textbox2.value))
/sum((ReportItems!Textbox1.value+ReportItems!Textbox2.value) )
Am getting # error,How can i SUM the above expression?
Any suggestions please?Thanks,
Samba