I'm trying to sort a ClientDataSet on a calculated boolean field, but for some reason the data is not sorted. I have a boolean field named Highlight
with FieldKind
set to fkInternalCalc
, and an index defined like this:
IndexDefs[0].DescFields = 'Highlight';
IndexDefs[0].Fields = 'Highlight;PatNo';
IndexDefs[0].Name = 'PatNo';
IndexDefs[0].Options = [ixDescending];
and obviously I have set my client dataset's IndexName
to 'PatNo'
. When I run my application, the data in the CDS is sorted on PatNo
field only. Any thoughts?
Ime, indexing a ClientDatasSet on a compound index including an fkInternalCalc field works fine.
The code below works in D7 and XE6, and with Midas.Dll version ten years apart, giving
So, unless there was some kind of regression in XE2, I would suspect the problem reported was in something at the OP's end.