Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP 5.0 - Grid - Running Balance
Message
De
03/01/1997 14:35:24
 
 
À
03/01/1997 14:25:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00016391
Message ID:
00016416
Vues:
63
>thisform.calc_bal code (maybe this is the part where I am messing up)
>-----------------------------------
>thisform.n_run_bal = thisform.n_run_bal + history.amount
>return thisform.n_run_bal
>
>I created a property for the form to hold the running balance: thisform.n_run_bal

Ok, I know what you meant in the first place where the value was being incremented.

The problem is that the grid is calling the method not only one time per record but each time it is being accessed.

I would suggest doing a COUNT SUM(yourfield) FOR recordbeforeorequalthecurrentone TO lnBalance.

Make sure you have a tag on the condition.

Another method will be to add an additional field in your table and avoid the calculation at run time.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform