Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
To calculate the sum of all the registrations of a grid
Message
De
17/02/1999 11:24:29
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00188358
Message ID:
00188430
Vues:
21
>Note: I am use a traslator.
>
> I have a grid in the one which you digitan numeric values, and the sum of all the values of all the registrations should stop to a field in which the sum of these was stored. To make it, I make a consultation SELEC. The problem is that I need that when the user changes the value in a registration, then be reflected automatically in the sum, without waiting to that this it is kept (since the SELEC doesn't take the change until he/she keeps the registration). Does some of you know as making this?

Running a select per value change is time consuming and also doesn't get buffered records as you said. Instead do only one SQL into array as parent changes. Add code to lostfocus of numeric fields that effect the sum. You only need ArrayValue + (Newvalue-Oldvalue). This approach is fast. ie:
* When of num field
scatter memvar
* Lostfocus of control
aSum[1] = aSum[1] + ;
  (eval("m."+;
     substr(this.controlsource,rat(".",this.controlsource)+1)) ;
  - this.value )
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform