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.
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})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With