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

Report with multiples copies

edited August 2005 in General

I want to print a 4 copies of a report (changin Report.PrinterSetup.Copies =
4), but I want to print a label in the first copy that diplay 'Original'
and in the next 3 copies dispaly 'Copy'.

I try to chage de caption of the label in the DetailBandBeforePrin,
lblCopiesOn Print; but only
execute this events in the first copy.... and display 'Original' in all the
copies...What can I do to change de caption of the label in the last 3
copies?. What events I can use? Is that Posible?
----------------------------------------
Example:

Report Copy 1:
lblCopies.Caption := 'Original';
Name: Jairzinhio Pacheco Villarreal

Report Copy 2:
lblCopies.Caption := 'Copy';
Name: Jairzinhio Pacheco Villarreal

Report Copy 3:
lblCopies.Caption := 'Copy';
Name: Jairzinhio Pacheco Villarreal

Report Copy 4:
lblCopies.Caption := 'Copy';
Name: Jairzinhio Pacheco Villarreal
--------------------------------------------
Thanks

Ing. Jairzinhio Pacheco Villarreal

Comments

  • edited August 2005

    Here is an article from the tech tips newsgroup

    -------------------------------------------------------
    Tech Tip: Printing a Unique Caption for each copy of
    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

    FCopy := 0;

    6. In the Report.OnStartPage event code

    if ppReport1.SecondPass and (ppRepor1.AbsolutePageNo = 1) then
    Inc(FCopy);


    7. Add a Label to the Report and in the OnPrint event code something like:

    case FCopy of
    1: ppLabel1.Caption := 'Shipping';
    2: ppLabel1.Caption := 'Order Processing';
    3: ppLabel1.Caption := 'Account Receivable';
    end;



    --
    Tech Support mailto:support@digital-metaphors.com
    Digital Metaphors http://www.digital-metaphors.com


    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.