Autocalculate fields 
Author Message
 Autocalculate fields

This is probably another "new user" question.   But, how do you create a field
that has a runing total??

Given a series of records with a field for  "charges" & "payments,"  I'd like
to have a column for a running total as of that record.  (ie last_total +
current_fee.)  Since you can't refer to the previous record in an autocalcuate
computation without recursion, how do you access that "previous balance."

 You can a) put a second table refering to your database and re-sum the
previous balance each time (works but slow for large ledgers,)  b) create an
array of totals in ram (but then you have to have & maintain a field for serial
 integers to know where to refer in the array - might as well have a permanent

running total field in your database - which is what I'm trying to avoid.)
I've come up with several Rube-Goldberg approaches - but.

I'm sure there's a simple answer that I'm overlooking.   Please - someone tell
me I'm missing the obvious.

Thanks, Jim




Thu, 21 May 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Adding a field to the field-definitions using Diamond Access

2. Filter on Lookup Field or Calculated Field

3. Memo Field to Database field

4. drag/drop fields to form from table/field popup in design

5. Help!! Updating a DB field through FIELDS[x]

6. Copy data from string field to memo field

7. Change one field when another field changes?

8. lookup field with multiple key fields

9. Paradox autoinc fields vs MS SQL identity fields

10. Index Detail on Field other than link field

11. Field Formar for DBGrid & Date fields

12. Lookup fields w/ dymaic fields???

 

 
Powered by phpBB® Forum Software