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?
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';
Comments
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;
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com