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

How to print 2 reports in one page

edited December 2009 in Subreports
Hello,

I'm having a problem with a report.
I need to design a report in a A4 sheet size wich contains two copies of the
same report wich is in A5 sheet size. One copy in the upper side of the
sheet and one in the lower side of the sheet
I already have created the report in the A5 size in a diferent file. It's a
master / detail report. It has a group header,a subreport and a footer wich
is not the group footer.

Thanks in advance,

Jaume Serra

Comments

  • edited December 2009
    Hi Jaume,

    Try using two fixed style subreports in a single main report. Note that
    fixed style subreports need to be sized vertically to take the proper amount
    of space.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2009
    Thanks Nico,

    I don't understand exactly why the subreports needs to be oriented
    vertically. If I size the report in paper A5 verically, I get a message
    saying that the controls beyond the new page width will be removed.

    The main report the sheet is sized vertically and A4 in paper size and the
    two subreports are sized horizontally and A5 in paper size, like cutting in
    half a A4 sheet.

    I've tried it. Now I can print one report (the upper one) on one page and
    the secont report prints on a second page. Have you any idea what's
    happening?

    Regards,

    Jaume Serra

    PS: Sorry for emailing these questions to support@digital-metaphors.com.

  • edited December 2009
    Hi Jaume,

    If you size the detail band to the size of the A4 paper (remove the header
    and footer bands), you can size each Fixed subreport to half that size
    inside the detail band. Then load the template of the smaller report into
    each subreport. This will essentially fit both copies of the subreport on a
    single page.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

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

    I've tried in that way but I still have 2 pages with 1 subreport in each
    page.
    I've done some testing with a new main report (without header and footer
    bands) and 2 fixed subreports each one has only the detail band with a few
    DBText's. Print 2 pages with 1 subreport in each page.

    I'm working with Delphi 2005 and RB 9.01

    Regards,
    Jaume Serra

  • edited December 2009
    Hi Jaume,

    Unfortunately I am unable to create examples for older versions of
    ReportBuilder.

    Are you connecting the main report to a dataset? Have you tried to create a
    simple example from scratch without any data? Basically a report with a
    detail band sized to the size of a page and two fixed subreports inside the
    detail band.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

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

    I've done some testing. The report has no dataset atached so I tried a new
    project in delphi with a simple report and worked well.
    Then in my application I started to build the report from scratch: the main
    report only with detail band, two fixed subreports (the master ones), change
    paper size to A4 Vertically
    In both master subreports, changed the paper size to A5 horizontally, added
    a group for datapipeline's datafield and checked start new page and reset
    page number on On Group Change control in menu report, groups.
    In the master subreports have a group header and a footer (not from the
    group) and in detail band a new subreport (the detail one).
    In the detail subreport a detail band with some fields.

    If I check start new page and reset page number on On Group Change I get two
    pages, one page for each report however if I uncheck this options I can
    print 1 page with the two master subreports.
    I have found another problem, if the size of the master report in A5 needs
    to be printed onto two pages, I can only see the first so I can't print the
    second one. Any idea of how can I do it?

    Thanks in advance.
    Jaume Serra


  • edited December 2009
    Jaume,

    What is the purpose of the group? If you want to break to a new page for
    each group but keep both subreports on a single page you need to take the
    group header and footer into account. Be sure you have enough room on the
    page for those bands (or size them to 0).


    I'm unclear about what you would like to happen in this case. If the
    subreport needs to take two pages, where would you like the second page to
    be printed?

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2009
    Ok, I'll try to explain me better. The idea is printing an invoice or bill
    wich is in A5 paper onto micro-perforated sheets in A4 size. The "original"
    invoice in the upper part of the A4 sheet and the "copy" on the lower part.

    The idea of having a group is to break into new page for every invoce
    number, because I have the possibility to print more than one invoice and I
    want to print it in separated pages.
    I've already taken into account the group header and footer onto the fixed
    subreport's size.

    The invoice may have more than one page so I would like to have a report
    with something like the example below; where Main report is A4 paper, Master
    and detail reports are in A5 paper:
    Main Report Page 1 --> upper Master report page 1 --> upper Detail report
    page 1
    Main Report Page 1 --> lower Master report page 1 --> lower Detail report
    page 1
    Main Report Page 2 --> upper Master report page 2 --> upper Detail report
    page 2
    Main Report Page 2 --> lower Master report page 2 --> lower Detail report
    page 2
    Main Report Page n --> upper Master report page n --> upper Detail report
    page n
    Main Report Page n --> lower Master report page n --> lower Detail report
    page n

    Regards,
    Jaume Serra

  • edited December 2009
    Hi Jaume,

    I added a rbWiki article with an example of how to accomplish this. In your
    case you will want to set the TraverseAllData property to True for the
    subreports so the overflow data will move to the next page.

    The example was created in RB 11 so you will either have to try to ignore
    the errors when opening it in RB 10 or download a trial version of RB 11, or
    upgrade :).

    Hope this helps.

    http://www.digital-metaphors.com/rbWiki/Design/Pagination/How_To..._Print_Two_Copies_Per_Page

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

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

    Sorry for my late reply I was on Holidays.
    I made a new report exactly the one in rbWiki with RB 9 and didn't worked.
    After downloading the trial version of RB 11 both reports the bill one and
    the example one worked ok. It's a problem with that version of report
    builder.

    Thanks again for your time and patience.


  • edited December 2009
    Hi Jaume,

    The example will definitely not work in RB 9. I'm unsure what the issues
    might be regarding recreating it from scratch with that version. I am
    unfortunately unable to test here with older versions of ReportBuilder. My
    guess is that we had made some enhancements to the pagination logic for
    later versions of ReportBuilder.

    Please consider upgrading your version of ReportBuilder to the latest to
    take advantage of the new features and fixes.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

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