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

Howto change paper bin between printing first and second copy of a report?

edited June 2005 in General
Hi,

in my application (D5, RB 7.04) the standard preview with standard print
dialog is used. Some of my customers want to get the FIRST COPY of a report
printed from "bin1" and the SECOND COPY from "bin2".

I know how to change the bin names as shown in the tech-tips. But what is
the right EVENT for doing this?

Regards,

Eric

Comments

  • edited June 2005
    Hi Eric,

    Try using the Report.StartPage to keep track of the number of copies a page
    has been printed. Then change the printer bin from there if you are on a
    separate copy. For instance...

    procedure TForm1.ppReport1StartPage(Sender: TObject);
    begin

    if ppReport1.AbsolutePageNo = 1 then
    FCopy := FCopy + 1;

    if (ppReport1.PrinterDevice <> nil) then
    begin
    if (FCopy = 1) then
    ppReport1.Engine.Page.PrinterSetup.BinName := 'Tray 1'
    else
    ppReport1.Engine.Page.PrinterSetup.BinName := 'Tray 2';

    end;

    end;

    --
    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.