Datasnap.DBClient.TAggregate

From RAD Studio API Documentation
Jump to: navigation, search

System.Classes.TCollectionItemSystem.Classes.TPersistentSystem.TObjectTAggregate

Delphi

TAggregate = class(TCollectionItem)

C++

class PASCALIMPLEMENTATION TAggregate : public System::Classes::TCollectionItem

Properties

Type Visibility Source Unit Parent
class public
Datasnap.DBClient.pas
Datasnap.DBClient.hpp
Datasnap.DBClient Datasnap.DBClient

Description

TAggregate represents a maintained aggregate in a client dataset.

Use TAggregate to specify the formula for an aggregate that can be used by a client dataset. Each aggregate object describes a calculation that summarizes the data in a set of records. The group of records that is summarized is part of the aggregate object. Thus, if a client dataset is performing the same summary calculation over subgroups of records and over the entire dataset, it must use two separate TAggregate objects.

When aggregates summarize data over a group of records (rather than the entire client dataset), they must be associated with an index. The fields in the index define the possible groups of records. When a client dataset changes its index, any aggregate not associated with the new index becomes unavailable, and any active aggregate associated with the new index becomes available.

Aggregate objects can be created and used directly in code at runtime. At design time, you can use the Fields editor to add aggregate fields to a client dataset. When you define aggregate fields at design time, the Fields editor automatically creates the TAggregate objects for them.

See Also