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

Multiple reports in the same preview window - again.

edited September 2003 in General
Hi Nico,


I've created subreports dynamically, and loaded each template into the
subreport. However, now RAP starts barking at me about not being able
to run certain pieces of code - for example, stuff that has to do with
report Parameters... One of these dynamic subreports has subreports
by itself, and uses a global OnCreate event to declare variables that
have access to report parameters - a tip from you :)

I hope you're not going to tell me I have to tailor each normal report
template to fit in a subreport and act accordingly, right?

Is there really no other way to get multiple reports in the same preview/
print job so that they appear as a single job??? Something like:

(pseudocode)
ReportEngine.StartReport;

Report.Template.Filename := 'rep1';
Report.Template.Load;
Report.Print;
Report.Template.Filename := 'rep2';
Report.Template.Load;
Report.Print;

ReportEngine.EndReport;
ReportEngine.Preview;

??

--

With regards,

Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com

Comments

  • edited September 2003
    Hi Martijn,

    Yes it is possible to print multiple reports at once by creating a single
    printer device and calling StartJob, EndJob, for each report you need to
    print. To see an example of this, check out demo 123 located in the
    \RBuilder\Demos\Reports\... directory (dm0123.pas).

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2003
    Nico,


    But how about _previewing_ in the same job?

    --
    Martijn
  • edited September 2003
    Hi Martijn,

    One of our customers developed an Archive Merge utility that enables you to
    merge multiple report archives into one big report. You may be able to use
    this utility to merge your reports into one archive and preview it from
    there. Then you could either print from the archive viewer or using the
    method I described in the earlier post. If you would like a copy of the
    utility, please send an email to support@digital-metaphors.com requesting
    the file and I'll get it right out to you.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.