#ERROR WHEN MAKING A SPLIT IN THE RDLC EXPRESSION?
772
I have this percentage operation and it works with most, the error is in dividing by zero, how can I make it not show me #ERROR instead it shows me O (zero)
G =Fields!E.Value*100/Fields!D.Value
H =Fields!F.Value*100/Fields!D.Value
go to the Report option -> Report Properties -> Code
copy and paste
Public Function Divide(ByVal first As Double, ByVal second As Double) As Double
If second = 0 Then
Return 0
Else
Return first * 100 / second
End If
End Function
go to the Report option -> Report Properties -> Code copy and paste
and in the expression: