Not able to sum the field in Crystal reports 9 formula editor
Friends,
The below formula is not working. Please point me where iam making mistake.
VB Code:
whileprintingrecords;
global numbervar tottrd;
numbervar cnttottrd;
if
(
{Admin.OTC}="001"
or
{Admin.COEN} in
["Chargeable Labour + Chargable Spares",
"Chargeable Labour + Free Spares",
"Chargeable Spares + Free Labour"]
)
then
cnttottrd := {PAYMENTS.PAIDAMT}
else
cnttottrd := 0;
tottrd := tottrd + cnttottrd
if i change
cnttottrd := {PAYMENTS.PAIDAMT}
to
cnttottrd := 1
then its working.......
Please treat this as urgent.
Thanks & Regards
Sathyguy
Re: Not able to sum the field in Crystal reports 9 formula editor
Can the PaidAmt field be Null? If yes, set the cnttottrd variable to 0 when the field is null.
Re: Not able to sum the field in Crystal reports 9 formula editor
Thanks.....yes there is a null value in that field.