Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Totaling grid column..
Message
De
12/08/1999 03:41:57
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
11/08/1999 14:38:25
Frank Cavone
Monetary Management of Ny, Inc.
Albany, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00252656
Message ID:
00252857
Vues:
10
>is there a way to total a column when using grid controls, if not, recommendations?
>
>fc
Frank,
If that's a running total you could do that with the addition of a calculated field. Your calculation routine sould be wise enough to only change the totals of current row and the rest.
If that's column total, then you would do it by placing a textbox control below the grid. Again there is a way to prevent lengthy recalculation anytime column value changes. Suppose you have parent-child form and grid is for child. Child records could be many. Using plain sum each time the value changes would be time consuming. Instead :
-Do a totaling once each time parent changes. An SQL sum to array is effective here (under normal circumstances each time parent changes you would be dealing with tableupdated data for the child).
-Place the result into textbox
-Each time column value changes add (postedit - preedit) value to textbox value.
I have been using this technique since 286s were used widely. It provides prompt totaling as column value changes ;)
PS: In a buffered table SQL sum would only sum tableupdated values.
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform