RAD Studio VCL Reference
TClientDataSet.AggregatesActive Property

Specifies whether the client dataset calculates and maintains aggregate values.

property AggregatesActive: Boolean;
__property Boolean AggregatesActive;

Use AggregatesActive to indicate whether the client dataset should maintain aggregate values. When AggregatesActive is false (the default), the client dataset does not support maintained aggregates. This allows the client dataset to avoid the overhead of calculating values that the application is not using. When AggregatesActive is true, the client dataset calculates and maintains all aggregate values specified by the Aggregates property that are compatible with the current index. 

When aggregates are maintained, the Value method of every active aggregate object returns a value that reflects the current data in the client dataset. When users edit the data in the dataset, these values are recalculated to reflect the user's changes.

Note: To selectively enable and disable aggregates rather than turning them all on or off at once, use the Active property of individual TAggregate objects. These objects are available through the Aggregates property.


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!