Filter: IExpression;
The Filter property returns filtering condition of data in cache.
Sub UserProc;
Var
MB: IMetabase;
DSInst: IDatasetInstance;
Cache: ICachedDataset;
i: Integer;
Begin
MB := MetabaseClass.Active;
DSInst := MB.ItemById("Table_1").Open(Null) As IDatasetInstance;
Cache := DSInst.OpenCached;
Cache.FetchToRecord(Cache.RecordCountAll);
Cache.Filter.AsString := "Num1 < 30";
Cache.Filtered := True;
i := Cache.RecordCount;
End Sub UserProc;
After executing the example, all records are loaded into cache from a data source, then the filter (filtering condition - Num1 <30) is set, and the "i" variable contains the quantity of records remaining after filtering.
See also: