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

Grouping multiple report executions into the same preview

edited August 2003 in General
Hi,

I would like to know if it's possible to have, basically, multiple reports being
executed in a single print preview/print job. Rave has this - and it's quite
easy when combining multiple reports into one large report. And actually, I
kinda need it :-)


--

With regards,

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

Comments

  • edited August 2003
    Hi Martijn,

    To do this you neet to create a new report which has SectionStyle (Set the
    PrintBehavior property)
    subreports in it. Then load each one of your reports into one of the
    subreports. Section style subreports always print on a new page. When you
    print the main report it will print all of them together as one report.

    It is possible dynamically create subreports in a detail band and load a
    report template into the subreport. There is an example of dynamically
    loading a subreport in your installation under
    ..\Delphi\RBuilder\Demos\EndUser\DynamicSubReportLoading

    To create subreports at runtime, here is an example
    http://www.digital-metaphors.com/tips/DynamicSubreportCreation.zip

    --
    Best Regards,

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


    So a "subreport" can be a normal report as well...


    I'll have a look at it - thanks for the suggestion.


    --

    With regards,

    Martijn Tonies
    Database Workbench - the developer tool for InterBase & Firebird
    Upscene Productions
    http://www.upscene.com
  • edited September 2003
    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
  • edited September 2003
    This was answered in a later post.
    --
    Best Regards,

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