DreadAngel
DreadAngel

Reputation: 772

Aggregating a calculated field in TClientDataset

Is it possible to add an aggregate field over a calculated field?

Suppose there is a cds with following fields:

and I want to add an agregate to get the sum of Total column. Is it possible?

Upvotes: 6

Views: 2197

Answers (1)

Uwe Raabe
Uwe Raabe

Reputation: 47714

Yes, that is possible if you change the calculated field to an InternalCalc field. The calculation is still done in the OnCalcFields event, but you have to check the state for InternalCalc when you make the calculation for that field.

Upvotes: 5

Related Questions