Results 1 to 2 of 2

Thread: Calculation Problem

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2003
    Location
    Hyderabad
    Posts
    46

    Calculation Problem

    Hai !

    I am working with Crystal Reports 8.5 ver.
    I have designed a report from a query. in the report I wanted to have a formula fields namely BALANCE and DRCR.
    what i mean to ask is ..... if there is a value which is returned in one record how to pass it to the next record?

    I want to have the values of BALANCE , and DRCR columns as follows...

    AccountName --- DebitAmount --- CreditAmount --- BALANCE-- DrCr
    ----------------- ---------------- ------------------ --------------- - -------
    acc1---------10,000.00-----------2,000.00----------8,000.00----D
    acc2-----------3,500.00---------13,500.00----------2,000.00----C
    GTB-----------5,000.00---------------0.00-----------3,000.00 ---D
    cash---------------0.00----------2,500.00------------500.00---D
    polo----------4,000.00----------6,000.00----------1,500.00--C

    totals : 22,500.00 ------- 24.000.00 ------

    for the first record the balance will be DEBIT - CREDIT if value is positive DrCr should be 'D' else 'C'. if the BALANCE is Debit then it should be added to the next record's DEBIT and the sum should be subtracted by CREDIT, otherwise the BALANCE should be added to CREDIT and sum should be subtracted from DEBIT... and the balance should be displayed....
    and so on.....

    [ Note : the difference of the sum of DEBIT AMOUNTS and the sum of CREDIT AMOUNTS should be equal to the final value of the BALANCE column... i.e. the sum(DEBITS) - SUM(CREDITS) in the above example is equals to 1,500 and it is C(credit) balance.]

    Thanks in advance...
    satyarao

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758
    You should be able to setup a "Running Total" field, calculated by a formula. I have never tried this but it should work for your purposes.

    Running Totals are created from the same dialog box that let's you drag/drop fields onto your report (can't remember what its called and I don't have Crystal on this machine). Anyways, its from the Insert -> Database Field menu.

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