Filtering data not working in runtime

Hello! I am applying a filter to a dataset in runtime, after I'm testing the filter of my dataSet (TMyDACTable) and it's ok, even in a DBGrid, but when my report is shown, the filter doesn't work. Is there something else to update the filter of the report's dataSet?

I use a TfrxDBDataSet in my form and set a TMyDACTable as it's DataSet. When I apply the filter in design time and show the report it works fine.

The part of code I'm using to apply the filter is the following one:
with frxDBDataset.GetDataSet do
    begin
      Filter   := someFilter;
      Filtered := True;
    end;

Thanks.

Comments

  • edited 4:07AM
    Did you try to refresh the dataset? I mean Close and then Open it.
  • Mick.pl wrote: »
    Did you try to refresh the dataset? I mean Close and then Open it.

    Yes Mick. But seems that this is not the problem.
  • edited 4:07AM
    Yes Mick. But seems that this is not the problem.
    Can you attach a similar report based on FR demo examples? It will be easier to verify that.

    And yet (as I prefer databases to do the main job) - can you create a dynamic query at run-time changing where clause?
    Or maybe a query with a parameter will be enough?

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.