Dataset Filtering

edited 1:55PM 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 1:55PM
    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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.