<p>I need to create an Aggregate Field in a TClientDataSet, but as said in the docs:</p>

<blockquote>
  <p>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.</p>
</blockquote>

<p>When I add a new aggregate field, the aggregate specification isn't added to the TClientDataSet's Aggregates, therefore I can't use its OnUpdateMethod.</p>

<p>I also tried handling the OnChange event of my new Aggregate Field, but it isn't fired at all.</p>

<p>Am I doing something wrong? I just want to have an aggregated field and fire an event everything it's value change.</p>

<p>Is this broken on delphi? Because what is in the documentation doesn't reflect the actual behavior.</p>

<p><strong>edit:</strong>
@Michal Sznajder
I'm using Delphi 2007</p>

[{'answer_id': 24916, 'author': 'Michal Sznajder', 'author_id': 501, 'author_profile': 'https://Stackoverflow.com/users/501', 'pm_score': 1, 'selected': False, 'text': '<p>Which version of Delphi ? I just tried clean D7 application and TAggregateField was added. </p>\n'}, {'answer_id': 27815, 'author': 'Roddy', 'author_id': 1737, 'author_profile': 'https://Stackoverflow.com/users/1737', 'pm_score': 3, 'selected': True, 'text': '<p>I think you may be getting confused between TAggregate and TAggregateField objects, and the Delphi documentation probably isn\'t helping.</p>\n\n<p>AFAICT, TAggregateField objects are automatically \'recalculated\' and can be bound to data-aware controls like TDBText, but don\'t have any OnUpdate event. </p>\n\n<p>"TAggregate" objects, on the other hand, do have an OnUpdate event, but can\'t be bound to data-aware controls.</p>\n\n<p>This may be enlightening:  <a href="http://dn.codegear.com/article/29272" rel="nofollow noreferrer">http://dn.codegear.com/article/29272</a></p>\n'}]
['https://Stackoverflow.com/questions/22212', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/727/']