2014-05-08 51 views
0

水晶报告中有一个“字符串是非数字”的例外。我该如何解决它?我已经写代码来检查空值字符串是非数字水晶报告中的例外

If IsNull({GL_PayableStatement.RemainingBalance}) OR {GL_PayableStatement.RemainingBalance}="" OR {GL_PayableStatement.RemainingBalance}="0" 
then 
0 
ELse 
ToNumber({GL_PayableStatement.RemainingBalance}) 

enter image description here

但还是没有修好! 请帮帮我。

+0

什么是“{GL_PayableStatement.RemainingBalance}”的数据类型' – Siva

回答

0

这里的问题是{GL_PayableStatement.RemainingBalance}包含一些非数值,因此最好的选择是将结果转换为stirng。

If IsNull({GL_PayableStatement.RemainingBalance}) OR {GL_PayableStatement.RemainingBalance}="" OR {GL_PayableStatement.RemainingBalance}="0" 
then 
ToText(0) 
ELse 
{GL_PayableStatement.RemainingBalance}