无记录时水晶报表公式字段错误 [英] Error in formula field of crystal reports when no records found
本文介绍了无记录时水晶报表公式字段错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在处理水晶报表.我想在每页的页脚上显示记录的总和.所以我在具有以下公式的水晶报表中添加了公式字段.
I am working on crystal reports. I want to show the sum of the record on footer of every page. so I have added the formula field in crystal reports which have below formula.
whileprintingrecords;
numbervar PageTotl;
if isNULL({Customer.PaidAmount})Then
0
else
PageTotl:=PageTotl + {Customer.PaidAmount}
当没有符合给定标准的记录时,它会在下面给出错误.
its gives error below when there are no records present with given criteria.
我必须在上面的代码中进行什么样的更改,所以它也可以处理 0 记录.
What kind of changes I have to made in above code, so it can also handle the 0 records.
推荐答案
首先遇到同样的错误,将公式改成下面的公式后,没有出现错误:
First, I got the same error, After fixing the formula to the following one, no errors came out:
whileprintingrecords;
numbervar PageTotl;
if isNULL({Customer.PaidAmount})Then
0
else
PageTotl:=PageTotl + ToNumber({Customer.PaidAmount})
这篇关于无记录时水晶报表公式字段错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文