RAD Studio
ContentsIndex
PreviousUpNext
Defining an Aggregate Field

An aggregate field displays values from a maintained aggregate in a client dataset. An aggregate is a calculation that summarizes the data in a set of records. See Using maintained aggregates for details about maintained aggregates.

To create an aggregate field in the New Field dialog box

  1. Enter a name for the aggregate field in the Name edit box. Do not enter the name of an existing field.
  2. Choose aggregate data type for the field from the Type combo box.
  3. Select Aggregate in the Field type radio group.
  4. Choose OK. The newly defined aggregate field is automatically added to the client dataset and its Aggregates property is automatically updated to include the appropriate aggregate specification.
  5. Place the calculation for the aggregate in the ExprText property of the newly created aggregate field. For more information about defining an aggregate, see Specifying aggregates.
Once a persistent TAggregateField is created, a TDBText control can be bound to the aggregate field. The TDBText control will then display the value of the aggregate field that is relevant to the current record of the underlying client data set.

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