TFrxDBDataset change Dataset at runtime?

Hello,
How do I change the Dataset / Datasource Value of a TFrxDBDataset at runtime so that the report gets to know the change.

I want to concentrate all the printing of my App in one place (a Datamodule). All the reports I have to print use 3 Datasets at most.
So I put 3 TDatasets on the Module and 3 frxDBDatasets.

If I show or print a report, whose datasets have been set up at designtime with these Components, all works fine.
If I change the SQL query of the underlying Dataset(s) in my code, the report remains empty.

As I understand, the TfrxReport Component provides the Dataset (and thus the content) to the Report to print.
The Report (.fr3) stores these "connection" to the given Dataset and the data.
If I try to edit a report (.fr3) that is not designed with the actual TfrxReport / Dataset combination, I need to set up the appropriate Combination of Dataset(s) to the Tfrxreport Component
tp make it work.

Is there a Parameter (or more) to set to have the TFrxReport refresh its data after changing the Dataset value?

Do I have to put a TDataset / frxDBDataset combination on the Module for all possible Queries of the reports I want to print?

TIA Rolf

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.