thank you
Do you want something like a "running totals" column? If so, you can do
a SQL self-join, e.g.:
CREATE CURSOR temp (idField Int, amount Num(15,2))
INSERT INTO temp VALUES (1, 11.3)
INSERT INTO temp VALUES (2, 8.7)
INSERT INTO temp VALUES (3, 10)
SELECT T1.idField, T1.amount, SUM(T2.amount) ;
FROM temp T1 ;
JOIN temp T2 ON T2.idField <= T1.idField ;
GROUP BY 1, 2 ORDER BY 1IOW, when you want to display any calculated columns in a
grid, your best bet may be to create a (parameterized) Local View on the actual data and
the use that view as yourGrid.RecordSource.hth-Stefan
Function Grid.AfterRowColChange
Lparameters nColIndex
If nColIndex = 3 And This.RowColChange>0
Local lcCol
lcCol=This.Columns(3).ControlSource
Select Sum(&lcCol) From (This.RecordSource) With (Buffering=.T.) Into Array
aTmp
Thisform.Text1.Value=aTmp(1)
Endif
-Anders
"NeoX" <t_f...@ufo-indonesia.com> wrote in message
news:eYRkfbX4...@TK2MSFTNGP02.phx.gbl...
> Hallo any one,I'm totally new in Visual FoxPro, I want to know how to sum
> total value in whole 1 columns on the grid
>
>
>
> columnname
> thank you
>
>
>
>