Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
To total Grid Column
Message
 
To
28/07/1998 05:27:20
Chiang Jeffrey
Paramoun Air Sea Svcs P/L
Singapore, Singapore
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00121890
Message ID:
00121929
Views:
15
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform