Refresh Report.Designer after new report is loaded

Mark ElderMark Elder SD, USA
edited 2:04AM in FastReport 4.0
Hello,

I am trying to put something together like the Embedded Designer demo. In my case things will be reversed. The report will be loaded and then if the user wants to make changes they will switch to the designer tab. I have a drop down list of the available reports that the user can switch between. I am having trouble when switching to a different report.

If the user comes into the screen designs one report and then changes to a different report I have the following order of things:
  
  Report.LoadFromFile('FirstReport.fr3')
  Report.ShowReport(true);

  Report.DesignReportInPanel;
  Report.ShowReport(true);

  Report.LoadFromFile('SecondReport.fr3')
  // ?? Notify Designer that report changed
  Report.Designer.ReloadReport; // Causes AV

I found the Designer.ReloadReport method and I see that it is called if the Designers loads the report file. I get an AV when trying to call ReloadReport or even if I just switch to the tab that contains the designer.

Is there something different needed to notify the designer that the report in the frxReport object has been changed?

Thanks,

Mark

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.