I have come across two issues with the FooterCalculate code, one to which I have found the solution, the other not.
1. First, the easy one:
at line 940 of NxDBGrid.pas:
fkCustom: DoColumnFooterValue(Column.Index, FormulaSum);
should be amended to:
fkCustom:
begin
DoColumnFooterValue(Column.Index, FormulaSum);
Result := FormulaSum;
end;
otherwise the function CalculateColumn always returns zero for columns with a FormulaKind of fkCustom.
2. The second issue raises an EOleException error (I am using an ADO dataset) at line 920 of NxDBGrid.pas:
..
case FormulaKind of
fkSum, fkAverage: FormulaSum := FormulaSum + GetFieldValue(Column.Field);
...
when FooterCalculate is called when the dataset is in edit state. (There is no error if the dataset is in browse state). Unfortunately I cannot find the cause nor a solution to this.
The error message is: "Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another".
Not good.
Phil.












