Merging reports doesn't work with custom preview?

edited August 2019 in FastReport VCL
Hi,

I have this code that merges reports as found here on the forum:

frxReport.LoadFromFile...
frxReport.PrepareReport(False);
frxReport.LoadFromFile...
frxReport.PrepareReport(False);
frxReport.LoadFromFile...
frxReport.PrepareReport(False);
frxReport.ShowPreparedReport;

It works when I preview the report as long as there's no custom previewer assigned. When you assign a Preview component, the report is immediately displayed when you call PrepareReport and cleared for additional reports.

This seems like a bug.

I did find a workaround though, assigning the previewer in code after preparing the reports.

With regards,

Martijn Tonies

Comments

  • Hello,

    Thats seems a bug. I've put it to our BUG tracker.

    As a temprary solution you can reset preview and set it after preparing.

    Like:


    frxReport.Preview := nil;

    frxReport.LoadFromFile...

    frxReport.PrepareReport(False);

    frxReport.LoadFromFile...

    frxReport.PrepareReport(False);

    frxReport.LoadFromFile...

    frxReport.PrepareReport(False);

    frxReport1.Preview := frxPreview1;

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.