Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2009
    Posts
    1

    Question Unanswered: Formula Issues Debits minus Credits

    Hello. I have a SQL database tied to Crystal Reports 2008. I am trying to create a balance sheet and struggling with some formulas.

    I have the following fields:

    Acct Number
    Description
    Amount
    DC (Debits/Credits)

    What I need is a sum of the "D" amounts (which are the debits) minus the sum of the "C" amounts (which are the credits) for a total amount per account number.

    Any help would be greatly appreciated. I am a newbie at Crystal Reports. I have used MS Access but this package is new for me.

    Thank you.

  2. #2
    Join Date
    Dec 2004
    Location
    Connecticut
    Posts
    85
    Since Debits and Credits appear in the same field, you have to separate them. You'll have to make a calculated field for both Debits and Credits that look something like this:

    Debits: IF {DC} = "D" THEN {Amount} else 0

    Credits: IF {DC} = "C" THEN {Amount} else 0

    (My syntax is always wrong since I switch back and forth between MSAccess and Crystal - use the Builder to confirm your syntax)

    Once you have Debits and Credits separated, you can summarize them and use them in other calculations.

Posting Permissions

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