title: How to sort a ClientDataSet on a calculated field?
body: <p>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 <code>Highlight</code> with <code>FieldKind</code> set to <code>fkInternalCalc</code>, and an index defined like this:</p>
  
  <pre><code>IndexDefs[0].DescFields = 'Highlight';
  IndexDefs[0].Fields = 'Highlight;PatNo';
  IndexDefs[0].Name = 'PatNo';
  IndexDefs[0].Options = [ixDescending];
  </code></pre>
  
  <p>and obviously I have set my client dataset's <code>IndexName</code> to <code>'PatNo'</code>. When I run my application, the data in the CDS is sorted on <code>PatNo</code> field only. Any thoughts?</p>