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

different printer shaft

edited August 2004 in General
Hey,

I want print the first page of a report on bin 1 (there is printed
business paper inside) and the following pages on a different bin.
Is it possible do write some code in RAP?

Thanks for a short notice

cu
Helmut

Comments

  • edited August 2004
    Hi Helmut,

    To change the printer setup for an individual page on the fly, you will need
    to access the Report.Engine.Page property with unfortunately not available
    in RAP. This means you will need to create a pass thru function to enable
    this type of bin change. Below is how this should be done in Delphi.

    procedure TForm1.ppReport1StartPage(Sender: TObject);
    begin

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

    else if (ppReport1.AbsolutePageNo = 2) then
    ppReport1.Engine.Page.PrinterSetup.BinName := 'Tray 2';

    end;

    end;

    --
    Best Regards,

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