Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
To total Grid Column
Message
 
À
28/07/1998 05:27:20
Chiang Jeffrey
Paramoun Air Sea Svcs P/L
Singapore, Singapour
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00121890
Message ID:
00121929
Vues:
16
Hi Chiang,

Write a custom method which receives field name as parmeter and returns total of a column. In this method use

For Example
*-- Method GetSum
LPARAMETER tcfield
LOCAL lcalias
LOCAL ARRAY lasum[1]
lcalias = Thisform.grditem.recordsource
SELECT SUM(tcfield);
FROM &lcalias;
INTO ARRAY lasum

RETURN lasum[1]

Hope will help

Bye
Jayesh



>I have set up a one-to-many form with the grid showing invoice line items.....it there an easier way to total a column in the grid rather than going through all that as described in the TASTRADE sample that came with VFP 5.0
>
>I tried using the SUM command but is doesn't work.
>
>Can someone direct me to the easiest method in doing so?
>
>Thank you
>
>Rgds,
>Jeff Chiang
- Jayesh
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform