1 Reply Latest reply on Dec 31, 2008 2:26 AM by raybaudi

    Calculate fields in database or report

    goosse

      Title

      Calculate fields in database or report

      Post

      First of all my native language is not english so sorry for that.

      Second my problem is this i have a table with a few columns like accountnumber and amount_debet and amount_credit 

      I would like to calulate all the acountnumbers with the same number the amount_debet and the amount_credit.

      I allso have to do some other calculations with these amounts. My question is do i have to do those calculations in the database and do i have to create some extra fields in my tables or can i do these calculations on the report i generate?

       

      thnx allready 

        • 1. Re: Calculate fields in database or report
          raybaudi
            

          Hi Patrick

           

          I suppose that:

           

          1) you have 2 tables, Accounts and Amounts

          2) Amounts::accountNumber is a field related to the primary key field Accounts::accountNumber.

           

          If so, from table Accounts, you can retrive the total amount_credit for each account with a calc like this:

          Sum ( Amounts::amount_credit )