Crystal Report formula to keep running total/balance

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • samvb
    New Member
    • Oct 2006
    • 228

    Crystal Report formula to keep running total/balance

    I am using CR for VS 2010. Basically, i need such report:

    GIVER ITEM QUANTITY BALANCE
    UNDP DELL 10 10

    SAMI 2 8 (means sami took 2 pcs, so 8 remain now)
    DANIEL 3 5 (means daniel took 3 from the 8 remaining so now we have 5)

    UNAIDS DELL 8 13 (13 is now the 8 given plus the 5 remaining on top)

    BERHE 2 11

    ....

    My initial try was to create a formula that sums up total taken in a specific batch. that is like 2+3, 2 in above example. That worked fine thru grouping.

    The problem is i cant add that balance to the next batch. i.e. the 8 dell from unaids to the 5 remaining dell from previous. The first balance is always same as its quantity which i get easily thru RecordNumber=1 then same

    But for the next batch, i need to get the balance from previous batch, add it to the current batch'es quantity then go on calculating. My failure is saving the previous batch's balance and adding it.

    Any idea?
Working...