Click here to Skip to main content
15,896,730 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

While running the crystal report, for some values there is a "String is non-numeric"exception.
I have tried the code -
SQL
If IsNull({GL_PayableStatement.RemainingBalance}) OR {GL_PayableStatement.RemainingBalance}="" OR {GL_PayableStatement.RemainingBalance}="0"
then
0
ELse
ToNumber( {GL_PayableStatement.RemainingBalance})


But still the error is there!

Please help me.
Posted
Comments
Maciej Los 8-May-14 2:52am    

1 solution

What's the value you're passing?
VB
Add one more OR condition to check the value is numeric or not.
If IsNull ({GL_PayableStatement.RemainingBalance}) OR {GL_PayableStatement.RemainingBalance}="" OR {GL_PayableStatement.RemainingBalance}="0" OR Not(IsNumeric({GL_PayableStatement.RemainingBalance}))
 Then
 0
Else
 ToNumber ({GL_PayableStatement.RemainingBalance})
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900