Results 1 to 3 of 3

Thread: Not able to sum the field in Crystal reports 9 formula editor

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2005
    Posts
    57

    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:
    1. whileprintingrecords;
    2. global numbervar tottrd;
    3. numbervar cnttottrd;
    4. if
    5. (
    6. {Admin.OTC}="001"
    7. or
    8. {Admin.COEN} in
    9. ["Chargeable Labour + Chargable Spares",
    10. "Chargeable Labour + Free Spares",
    11. "Chargeable Spares + Free Labour"]
    12. )
    13. then
    14. cnttottrd := {PAYMENTS.PAIDAMT}
    15. else
    16. cnttottrd := 0;
    17. tottrd := tottrd + cnttottrd

    if i change
    cnttottrd := {PAYMENTS.PAIDAMT}
    to
    cnttottrd := 1
    then its working.......

    Please treat this as urgent.

    Thanks & Regards
    Sathyguy

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    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.

  3. #3

    Thread Starter
    Member
    Join Date
    Jan 2005
    Posts
    57

    Re: Not able to sum the field in Crystal reports 9 formula editor

    Thanks.....yes there is a null value in that field.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width