Topic: Tablegrid Footer

Hi,

I'm using a SQL query to setup a tablegrid and like to know how to include footers like SUM using script. Thanks for any advice.

Re: Tablegrid Footer

Hello.


Try to use one trick.
Open settings of TableGrid, add some fields and set up footers.
And check, that you have option "Show child records"



Also you can do it using script:

procedure Form1_TableGrid1_OnChange (Sender: string);
begin
    Form1.TableGrid1.Columns[0].Footer.FormulaKind := fkSum; // for first column
    Form1.TableGrid1.CalculateFooter;
end;

begin
    Form1.TableGrid1.Options := Form1.TableGrid1.Options + goFooter;
end.

all formulas

fkSum
fkCount
fkAverage
fkMaximum
fkMinimum
fkDistinct
Dmitry.