Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Print multiple reports with one preview?

edited October 2003 in General
I'm using RB 6.

I have multiple reports in my application. I want to give the user the
possibility to print them in one time. I would like it that the user sees
them all in 1 preview, and when he presses the print button they all print.
So instead of previewing 5 times, only one time and then just pressing the
print.

Is this possible? How?


Thanks in advance,

Stijn Verrept.

Comments

  • edited October 2003
    Hi Stijn,

    You can add many reports to a single report by using subreports. You're
    best bet would be to use section style subreports with your original reports
    loaded into each one. Your original reports can be loaded manually in the
    designer or dynamically at run-time if you need. Below is a quick snip of
    code to load a report at runtime.

    Subreport1.Report.Template.FileName := 'myReport.rtm';
    Subreport1.Report.Template.LoadFromFile;

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2003
    Thanks Nico for your fast answer. One more follow-up question:

    There are a lot of calculations on data necessary for each report. Is it
    possible to do the following:

    - Let the original report be created (but not printed).
    - Then save to a file (but with the data, so the full output)
    - Bundle those files in the 'total' report? with the procedure you gave?

    Thanks in advance,

    Stijn Verrept.


  • edited October 2003
    Hi Stijn,

    Yes, this should be possible, though we have had customers who had trouble
    combining numerous reports with extensive calculations and processing. You
    may also want to consider generating, then exporting your reports to Archive
    file (raf), which will essentially take a snap shot of your report to be
    viewed. Then merging your archive files using the Archive Merge Utility.

    If you would like to try this method, send a short e-mail to
    support@digital-metaphors.com requesting the Archive Merger and I'll send it
    right out to you.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2003
    Sent the mail, received the component, set it up in about 15 minutes and
    it's working great!!!!!! (together with ppArchiveReader)

    Thanks again.

This discussion has been closed.