Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Columns total
Message
 
À
21/03/2006 08:58:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01106199
Message ID:
01106207
Vues:
23
>Hi
>If I have cursor with few fields (The columns names and count is not permanent but data type always is integer).
>The first column name is permanent.
>I want to add column to total the values in all columns for each line without the first column (second column and onward).
>Help plesae

Where you show this column/ In Grid, in Report or somewhere else?
If in Grid you could set ControlSource to be:
[thisform.CalckTotal()]
In CalkTotal method:
  LOCAL lnTotal, lnFor
  STORE 0 TO m.lnTotal
  FOR lnFor = 2 TO FCOUNT(thisform.Grid1.RecordSource)
      m.lnTotal = EVALUATE(FIELD(m.lnFor,thisform.Grid1.RecordSource))
  ENDFOR
RETURN m.lnTotal
Check Display calculated values in a column in solution Samples
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform