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

RB Pro 7.03 - How create POS printout with "endless paper" / printer special functions.

edited July 2005 in General
I have to print a fairly complex report (several subreport and
regions) to a POS printer (Epson Tm88iii).
It's working pretty wll,

1.) but the pagebreak is driving me crazy.
Any chance to get rid of that? And of course the footer should be
printed directly after the last detail band (not at the bottom of a
"fixed" paper length).

2.) Is there a chance to include ESC/POS command into the report, so
that for example the drawer can be opened?

Are there are changes in the new 9.x Reportbuilder versions, so that
an update might be solving the above problems in a minute?

Regards
Gunther

Comments

  • edited July 2005
    Hi Gunther,

    See the following articles below on printing to continuous paper and adding
    ESC codes/commands to your print job. ReportBuilder still does not natively
    support the addition of ESC codes to the print job as it uses the Windows
    API to communicate with your printer driver.

    ----------------------------------------------------
    Article: Printing to Continuous Paper
    ----------------------------------------------------

    1. Layout

    For continuous printing (for example a receipt) use Title/Summary and
    removing the Header/Footer. Set the PrintHeight of each to phDynamic. Layout
    the DetailBand to print a single line item. Set the margins to 0 or to the
    smallest that the printer driver will support (some printers have an
    unprintable area).

    With this configuration The Report will generate a Title followed by a
    variable number of Detail bands that span pages if needed, and then finally
    print a Summary at the end.

    2. Pagination

    a. dtPrinter

    Some printer drivers have a continuous paper size setting. If not then try
    setting the paper size to be very small - perhaps the size of the tallest
    band in the layout. Or try setting the page height to be the size of a
    detail band. Note that some printer drivers will only accept page sizes
    within a certain range of paper sizes.

    b. dtReportTextFile

    With the above layout, the report text file will generate the page breaks
    properly, however the device will fill up a page with blank lines. You can
    control the number of lines per page by configuring the CharacterGrid
    property in the Report.BeforePrint event:

    example:


    procedure TForm1.ppReport1BeforePrint(Sender: TObject);
    var
    lDevice: TppReportTextFileDevice;
    begin

    if (ppReport1.FileDevice <> nil) and (ppReport1.FileDevice is
    TppReportTextFileDevice)then
    begin
    lDevice := TppReportTextFileDevice(ppReport1.FileDevice);

    {120 characters per line, 66 lines per page}
    lDevice.CharacterGrid(120, 66);
    end;

    end;

    ---

    ReportBuilder renders to the printer using the Delphi TCanvas class and via
    calls to Windows GDI functions.

    We do not have any direct experience with sending escape codes directly to
    the printer driver. According to the Windows API documentation, the
    ExtEscape function allows applications to access capabilities of a
    particular device that are not available through GDI. Try searching the
    Windows API docs and Google for more information.


    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.