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

Multiple copies with different footer

edited January 2002 in General
I am building a report that replaces a carbonless multi page form. With
each copy having a different footer (File Copy, Office Copy, Customer Copy,
etc.). How would I go about doing this in ReportBuilder? And the bonus
question is can I also have a second page that only prints out after the
last copy of the first page?

Any ideas would be appreciated.
Thanks,
Dave

Comments

  • edited January 2002
    You'll have to print the report 3 times. In the footerband, you can
    dynamically load a subreport. You'll use 3 subreports, and load a different
    one every time you print for each recipient. There is an example of
    dynamic subreport loading in your installed RBuilder\Demos\EndUser
    directory.

    When the last version of the report is to be printed, you can also load a
    section style subreport in to the summary band of the main report. A section
    style subreport will always begin printing on a new page.

    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited January 2002

  • edited January 2002
    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;

    -
    --
    ---
    --
    -
    You can place a subreport in the summary band, because the subreport's
    ParentPrinterSetup can be false. The subreport will print only one copy, if
    the subreports' PrinterSetup.Copies is set to 1.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.