当找不到记录时,水晶报表的公式字段中有错误 [英] 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屋!
查看全文