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

Printing two reports on one page.

edited March 2002 in General
I would like to print a report twice on the same page. This is to print an
original an a copy of the report on the same page and give one to the
customer. Both the original and the copy use the same layout. How can this
be done? The report contains a header, detail and a summary band.

Thanks in advance,

--
Wim Looman
Hills automatisering bv

wim.looman@hills.nl

Comments

  • edited March 2002
    This demo should print 'original' or 'copy' on the page. It does this by
    adding a draw command to the page.

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


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited March 2002
    Hi Jim,

    I didn't mean to print a original and a copy, although it's for the same
    reason, but my problem is that i want to print a small report (half page
    size) twice on the same page. The second report always starts on page two. I
    tried this by setting the number of copy's to 2, it fit's easily, but it's
    printed on twe seperate pages. How to print these no one page?

    Thanks in advance,


    --
    Wim Looman
    Hills automatisering bv

    wim.looman@hills.nl


  • edited March 2002
    Sorry, I misunderstood what you wanted. I think the best way would be to
    use a subreport in the detail band which will print the customer copy. You
    could also try to use two subreports. One would print the merchant copy and
    another subreport below it would print the customer copy. You might want to
    save the report as a report template (rtm) then load it into a couple of
    fixed style subreports (Subreport.PrintBehavior) in the main report. The
    fixed style subreport will force the report engine to give the subreport the
    exact amount of height that you have specified at design time for the
    subreport to print within.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited March 2002
    Hi Jim,

    This solution works great, but not for us. We add an event to the component
    at run time, depending of the name of the component. This is because our
    customers can delete and add the compontents on the report. But when we use
    one or two subreports the names of the components change, so the events
    won't be added. Is there a way to print just two reports on one page by
    setting the number of copy's?

    Thanks again in advance.
    --
    Wim Looman
    Hills automatisering bv

    wim.looman@hills.nl


  • edited March 2002
    Ok, you'll need to specify a bottom offset so that you can get the blank
    space at the bottom of the page. You could also use a start new page group
    to get this behavior. I'll assume you've already got this handled. Now, as
    each page is generated, you can copy the draw commands on the top half of
    the page and create new copies of them which print on the bottom of the
    page. Here is an example:

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


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited March 2002
    BTW, does setting Report.Detail.BandsPerRecord to 2 not work? This should be
    the property to use, if you only need to print a detail band twice on a
    page. Sorry I didn't mention this earlier.


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.