Advantage TDataSet Descendant
Returns the relative position of the current record in given index order.
function AdsGetRelKeyPos : Double;
AdsGetRelKeyPos returns an estimation of the position in the current key in the indicated index order. The value returned will be between 0.0 and 1.0, inclusive. If there are scopes set on the index order, the position returned will be relative to the visible records.
AdsTable1.FindKey( ['Smith'] );
dPercentage := AdsTable1.AdsGetRelKeyPos;
{ dPercentage equals .785 to indicate that Smith was locaed at about 78% through the entire index }