>>I have a grid on a form which displays a set of records from a file (with a filter set).
>>There are 8 columns and variable rows, depending on the filter.
>>I have put text fields below the grid showing the totals of each column. I get these totals with SQL select and fill an array. The problem is that I can't refresh these totals using the SQL select into the array until after a TABLEUPDATE.
>>Is there an easier way to sum the values of the columns in the grid?
>
>You could use parameterized table-buffered view as Grid.Recordsource. Then you use CALCULATE SUM... from Grid.Column.Text.InteractiveChange event, assuming that you will restore record pointer.
Hi, thanks for the info. I tried this in the interactive change event (which fires for each number entered) for the column and for the lost focus for the column, it works, but the numbers I get aren't the correct totals for the columns--I don't know what they are! At first I thought perhaps it was ignoring the filter, but that's not the case.
I used CALCULATE SUM(thisform.grid1.column1.text1.value) to thisform.totals(1)
Any more ideas?
Thanks loads! Becky
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement