Aggregate Fields

Using Aggregate Fields With TClientDataSet

Delphi’s TClientDataSet provides support for aggregate fields. In the current implementation the IsNull function of the TAggregateField returns True unless the dataset is on the first record. This is problematic since ReportBuilder relies on the IsNUll function to determine whether field value is valid.

Therefore, a work around is required to use aggregate fields in a report. One approach would be to use a Label or Variable in the report and programmatically set the value.

Example 1:

Example 2: