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

Print Copies to different Bins

edited May 2003 in RAP
Is it possible to print (on the same printer) the first Copy of a report to
Bin A and the second to Bin B and the third to C?

Thanks
Juergen

Comments

  • edited May 2003
    Normally, you can print pages to different bins by setting the printersetup
    on each page to be different. An article is posted below describing this.

    Now, you have copies. To detemine which pages are copies, you can examine
    this demo which ID's each page.
    http://www.digital-metaphors.com/tips/MarkPagesWithCopy.zip

    Combine these two techniques and it should work just fine.

    --------------------------------------------
    Tech Tip: Selecting Paper Bins for Each Page
    --------------------------------------------


    Sometimes you may want to print the first page of a report to the
    manual bin and then print the remaining pages to the default bin.

    You can use the Report.OnStartPage event to set the bin for any page.


    Example:

    procedure TForm1.ppReport1OnStartPageEvent(Sender:TObject);
    var
    lsBinName: String;

    begin

    if ppReport1.AbsolutePageNo = 1 then
    lsBinName := ppReport1.PrinterSetup.BinNames[3]
    else
    lsBinName := ppReport1.PrinterSetup.BinNames[1];


    ppReport1.Engine.Page.PrinterSetup.BinName := lsBinName;


    end;



    Note: The above example assumes the manual bin is 4th in the list (remember
    its a 0 based index). To account for different print drivers, you could
    search for the 'manual' bin in code by performing a search on the printer's
    available bin names:

    for liBin := 0 to ppReport1.PrinterSetup.BinNames.Count-1 do
    if Pos('manual', ppReport1.PrinterSetup.BinNames[liBin]) > 0 then
    begin
    lsBinName := ppReport1.PrinterSetup.BinNames[liBin];
    break;

    end;

    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.