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

Fiscal printing

edited April 2002 in General
Dear DM Staff,

i've to print fiscal docs on a graphical pos printer loaded with a
fiscalized paper roll with pre-printed layout; on the roll documents are in
the following order: original, customer copy, original, customer copy, and
so on.
The problem happens in printing two or more pages documents. I'd have to
print page 1 twice (original + customer copy), same for the page two, and so
on.
Is there a way to print every single page two times, the second copy
immediately after the first, then going to the second page till report
finished?

Thanks for any suggestion.
Sandro

Comments

  • edited April 2002
    -------------------------------------------------------
    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


    2. Set the Report.PassSetting to psTwoPass. (add ppTypes to your "uses"
    clause)

    3. Create a private variable in your form: FCopy

    4. In the Report.BeforePrint event code

    FCopy := 0;

    5. In the Report.OnStartPage event code

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


    6. 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;

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited April 2002
    Thanks Alex, but that's not exactly what i need.

    I actually i have to print something like:

    Page 1
    Page 1
    Page 2
    Page 2
    Page 3
    Page 3
    and so on.

    I mean 2 copies of each page in this order due the paper roll fiscal layout.

    Thanks again for any tip
    Sandro
  • edited April 2002
    Here is a sample project that does this.

    http://www.digital-metaphors.com/tips/CollateVariousCopies.zip

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited April 2002
    Thanks for the answer Alex and for the sample project! The technique is
    clear despite i thought there could be a simpler method to duplicate pages,
    instead of fighting with virtual printing devices :D
    Thanks again
    Sandro
  • edited April 2002

This discussion has been closed.