rbWiki > Output > Printer > Print Copy Captions

Print Copy Captions

TECH TIP: Printing a Unique Caption for Each Copy of a Multi-Copy Report Sent to the Printer

Here's example of sending 3 copies to the printer and printing a unique caption for each one.

  1. Set Report.PrinterSetup.Collation to True
  2. Set Report.PrinterSetup.Copies to 3
  3. Set the Report.PassSetting to psTwoPass. (add ppTypes to your "uses" clause)
  4. Create a private variable in your form: FCopy
  5. In the Report.BeforePrint event code
  6.   FCopy := 0;
  7. In the Report.OnStartPage event code
  8.   if ppReport1.SecondPass and (ppRepor1.AbsolutePageNo = 1) then
        Inc(FCopy);
  9. Add a Label to the Report and in the OnPrint event code something like:
  10.   case FCopy of
        1:  ppLabel1.Caption := 'Shipping';
        2:  ppLabel1.Caption := 'Order Processing';
        3:  ppLabel1.Caption := 'Account Receivable';
      end;
Tags
none

Files (0)

 
You must login to post a comment.