Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calc SUM up to current record
Message
De
13/02/2006 17:54:08
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Divers
Thread ID:
01095907
Message ID:
01096009
Vues:
16
>Not realy. My works regardless of how many fields you have to sum w/o any additional code changes. It also references a field to SUM only once.
>

Sergey,
only to be precise, I has appraised skip solution, but it has two problems:
- it doesn't support the current position at EOF()
- it is not invariant relative to the current position,
that is, at the end of the calculation the record is not in the same record of departure.


>>Thanks, Sergey, yours looks equivalent to Fabio's. (I used his since I read it first)
>>
>>>Try
>>>SKIP
>>>lnRecno = RECNO()
>>>LOCATE
>>>CALC SUM(someField) WHILE RECNO() <> lnRecno
>>>
>>>>When I have a indexed table, how do I do
Calc sum(somefield)
for all records up to and including the currently selected record?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform