HI Everyone,
for suppose, I have a situation where I have to divide 2 fields from the dataset and I should avoid divide by zero. for which I have 2 approaches.
1.written a custom code as below
Public Function getresult(denominator As Double, numerator as Double) As double
If denominator=0 Then
Return 0
Else
Return numerator/denominator
End If
End Function
and added caluculated field having expression
=Code.getresult(Fields!numerator.Value,Fields!denominator.Value)
2 added a calculated field having expression
=iif(Fields!denominator.Value=0,0,Fields!numerator.Value/Fields!denominator.Value)
In this two scenario’s which is the optimized approach.(considering large data/ production server).
will vbcode impacts the performance of the report.
Thanks