TAggregateField
-
hi all, i'm having a problem with aggregate fields on a filtered dataset. before apply a filter, my aggregate fields look fine. as soon as a filter is applied to the dataset, the aggregate fields return me null. this is an example of how i'm creating an aggregate field. fld = new TAggregateField(ClientDataSet); fld->Active = true; fld->Expression = "SUM(Amount)"; fld->ResultType = ftFloat; fld->FieldName = "TotalAmount"; fld->DisplayFormat = "0.00"; fld->Alignment = taRightJustify; fld->Index = DataSet->FieldCount; fld->DataSet = DataSet; any ideas why this would be happening?? thanks in advance :) K.
-
hi all, i'm having a problem with aggregate fields on a filtered dataset. before apply a filter, my aggregate fields look fine. as soon as a filter is applied to the dataset, the aggregate fields return me null. this is an example of how i'm creating an aggregate field. fld = new TAggregateField(ClientDataSet); fld->Active = true; fld->Expression = "SUM(Amount)"; fld->ResultType = ftFloat; fld->FieldName = "TotalAmount"; fld->DisplayFormat = "0.00"; fld->Alignment = taRightJustify; fld->Index = DataSet->FieldCount; fld->DataSet = DataSet; any ideas why this would be happening?? thanks in advance :) K.
so no one has any ideas? fyi - yes I have set the filtered property, the filter works fine on the dataset. only the aggregate field does not get updated. and i dont want to re-open the dataset, i've already got the set of records i want to work with, i just need the aggregate field to re-calculate. thanks :)