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

Multiple Reports as one single report.

edited October 2001 in General
Hi..

I have multiple reports and I would like them to print as one single
report.. one after the other.. It can?t be printing them one after another
becouse I want them to be seen at preview as only one report..

Any suggestion..?

Tahnks in advance..

Comments

  • edited October 2001
    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.

    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited October 2001
    Thanks for your answer, but it works well only at design-time (as far as I
    tried).. I didn?t make myself clear, sorry..

    The fact is that I need this at runtime, becouse I do some run-time work
    with all diferent reports..

    Like:

    var

    Report1: TppMyOwnReport1;

    Report2: TppMyOwnReport2;

    begin

    Report1: TppMyOwnReport1.Create(...);

    Report2: TppMyOwnReport2.Create(...);

    Report1.DoSomething; // like setting column widths

    Report2.DoAnotherThing; // like setting field display formats..

    // and now?

    end;

    Thanks in advance..
  • edited October 2001
    For the single preview requirement, you'll need to build a single report.
    You can 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


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.