Dataset Filtering

edited 11:27AM in FastReport 4.0
I want to filter a dataset (an ADOQuery) with the following:
QueryData.Filter := '((StockGroup >= ''01G'') and (StockGroup <= ''01K'')) and ((Company = ''WHIP'') or (Company = ''WALLACE''))';
However Fast Reports tells me that I can't do that -
wrote:
"Arguments are of the wrong type, are out of acceptable range, or in conflict with one another"
As far as I can tell, the string is perfectly fine, and logical.
If I change the OR to AND then it parses just fine (obviously returning no results because Company can't be two values).
Does this mean that I can't mix both ANDs and ORs in the same filter?

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 11:27AM
    the problem may lie in the stripping of apostrophes, just like delphi.
    suggest you try the same filter on a query in delphi to see if it works.

Leave a Comment