TMedDataset.TranslateFilter TMedDataset

property TranslateFilter: Boolean ;

Description

Filter property can be set as either Delphi logical condition (default) or xHarbour logical condition. Translate filter property controls whether string passed to Filter property is translated from Delphi condition to xHarbour condition or not. So, if TranslateFilter is true, you can set Filter as Delphi condition and it will be translated into xHarbour condition. If TranslateFilter is false, no translation will occur and you can set Filter text as native xHarbour logical condition.

Example:

products.TranslateFilter := true; // the default

products.Filter := '(field1 > 2) and (field2 <7)'; // set filter condition as Delphi

products.Filtered := true; // activate filtering

// . . .

products.TranslateFilter := false; // no translation

products.Filter := 'field1 > 2 .and. field2 <7'; // set filter condition as xHarbour

products.Filtered := true; // activate filtering