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

2 Reports on 1 page

edited September 2003 in General
I have been requested to consolidate information for our executives, by
combining multiple reports onto 1 page.
Can you point me in the right direction?

Thanks.

Comments

  • edited September 2003
    To do this you need 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. If you do not want each separate report on a new page, try
    using a ChildStyle subreport.

    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 September 2003


  • edited September 2003
    Hi,

    Here is a simple example loading two report templates into ChildStyle
    subreports. Remember that ChildStyle subreports do not support a Header or
    Footer band so you will either need to use the Title and Summary or create a
    group around the report and use the GroupHeaderBand and GroupFooterBand.
    Hope this helps.

    http://www.digital-metaphors.com/tips/MergeReports.zip

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2003
    Thanks. I'll study it.

  • edited September 2003
    I tried to load that project and got a bunch of 'property
    OutlineSettings doesn't exist' messages. I'm using ver 6.03 on Delphi 6.
    Do I need an update?

    Thanks

  • edited September 2003
    Hi Douglas,

    The Report Outline was added in RB 7. Though we always recommend that you
    upgrade to the latest version of ReportBuilder, you should still be able to
    run the example I sent by just clicking "Ignore" for all the Outline
    messages shown.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2003
    OK, I got it to run (sort of), and it looks good. Now I created the
    'Hooking Reports with Section-Style Subreports' tutorial project,
    replaced the subreports with 2 of mine, and changed 'Section' to 'child'
    on both. They both print on 1 page, but they both start at the top of
    the page. What am I missing to make one follow the other?

    Thanks

  • edited September 2003
    Hi Douglas,

    Be sure that you have the second subreport set to "ShiftRelativeTo" the
    first one. The easiest way to set this is to right click the second
    subreport object in the main report and select the ShiftRelativeTo pop-up
    menu option.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2003
    Bingo! Perfect. Thanks a lot.

This discussion has been closed.