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

Duplex Printing

edited July 2003 in General

When printing multiple copies duplex, if the report has
an odd number of pages the next copy starts on the back
of the last page of the previous copy.

This causes problems when I need to distribute the reports
to different people. I've already asked and had a reply
about forcing an even number of pages but I only have this
problem when using Report Builder and think there should be a
simpler way of doing it other than that.

I've done several trials using the same printer/driver from the
likes of MS Word and each copy of a multiple copy duplex print starts
on a new sheet (as it should).

Am I just missing some sort of property setting. I need some sort
of way to tell the printer that e.g. 2 copies of a 13 page report
is not just one 26 page report.

Where we know the number of copies in advance the software is being
written to call the Print method multiple times and this obviously
works, but when an end user changes the copies in a print dialogue
then we have a problem.

We are using the latest print drivers and the printer is a QMS 4060B.
ReportBuilder 7.02, Delphi 6Pro.

Dave

Comments

  • edited July 2003
    Try setting Report.PrinterSetup.DelegateCopies to true at runtime. There
    isn't anythign built in to support copies where it doesn't start on a new
    page if the pritner is wanting to do this. You mentioned you got a response
    about adding a page at the end of hte report. This is probably the way to do
    it since RB tries to print the report copies in one job. You could also
    create a printer device and perform a loop to print the report copies by
    creating multiple print jobs. There is an exampler of printing using the
    TppPrinterDevice class in the main report demos.


    Cheers,

    Jim Bennett
    Digital Metaphors

    ------------------------------------------------------
    Article: Forcing Group Headers to Start on Odd Pages
    ------------------------------------------------------

    Question:

    I have a report that is printing duplexed
    and therefore I want to force the group headers to
    start on odd pages.

    Solution:

    Using demo report #71 do the following:

    1. Add a subreport to the GroupFooter band, just below the existing
    controls.

    2. Set the subreport's PrintBehavior property to pbSection - do not add any
    controls to the subreport - leave it blank.

    3. Add a Private field to the form: FPrintingSpacer: Boolean.

    4. Add an event handler for the FormCreate event with the following code:

    FPrintingSpacer := False;

    5. Add an event handler for the ppOrderDetailGroupFooterBand1BeforePrint
    event with the following code:

    if not FPrintingSpacer then
    begin
    ppSubReport1.Visible := odd(ppOrderDetail.AbsolutePageNo) and
    not ppOrderDetailGroupFooterBand1.Overflow;
    FPrintingSpacer := ppSubReport1.Visible;
    end
    else
    FPrintingSpacer := False;

    6. Run the project and view report #71.

    Note that when a group is to start, it will only start on an odd page.
    Caveats: We are brute-forcing this solution by causing the even numbered
    page to be taken up by the section style subreport. As a result, any page
    headers or footers you have in the main report will not appear on the even
    pages that are blank. To get around this, you could add identical
    header/footers or custom header/footers with only page numbers, or some
    such.

    --
    Tech Support mailto:support@digital-metaphors.com
    Digital Metaphors http://www.digital-metaphors.com
This discussion has been closed.