Composite report without fr3 files...

J.SJ.S
edited 7:35PM in FastReport 4.0
Hello,
I have need to save several raports to one pdf file. So, as I understand this, solution is composite reporing. Solution has only one exe file, so no individual fr3 files should be used. Before XE2 update I was using Rave, but found Fast Reports as better solution is long run.

Now I have separate FrxReport components for evey raport. When using composite reporting, all reports should be loaded into one FrxReport component. Is there any way to load raports with out writting them to disk? One solution I have found is to use SaveToFile functions to save raport to temp file and then load raports to one common FrxReport component one by one, but is there any other solution to copy report "in memory" into one what would be used to composite reporting as described in manual?
I found SaveToStream functions but that seem to be used only for prepared reports (at least I didn't find way to get it work).

Have I tried to solve this kind of issue from wrong way or is my solution only way to do composite reporting with out using separate fr3 files?

Comments

  • gpigpi
    edited 7:35PM
    Try to use

    frxReport1.PrepareReport;
    frxReport2.PrepareReport;
    frxReport1.PreviewPages.AddFrom(frxReport2);
    frxReport1.ShowPreparedReport;
  • J.SJ.S
    edited 7:35PM
    gpi wrote: »
    Try to use

    frxReport1.PrepareReport;
    frxReport2.PrepareReport;
    frxReport1.PreviewPages.AddFrom(frxReport2);
    frxReport1.ShowPreparedReport;

    Thanks! Solved! That works like charm!
  • J.SJ.S
    edited 7:35PM
    One small question, page numbers gives now headache. Variable TotalPages gives correct value with composite reporting but Page value is not correct. It seem to start from 1 always. How to get this done proper way?

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.