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

URGENT!!! Send Control characters to POS PRINT

edited March 2006 in General
I need to open a cash box connect to a POS PRINTER EPSON TM88II. after print
a report.
the printer is serial and it is connect to COM1.

I'cant open the port COM1 because raise an exception "PORT IS BLOCKED..."
for pos printer.

How can I send a control character via reportbuilder, like PRINT ESC +
CHR(27) + "P" + CHR($25)... after
i print the report.....

Thanks...

Comments

  • edited March 2006
    Hi Jaime,

    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
  • edited March 2006
    look at the epson control font
    and print an 'A' in that font
    otherwise look at the Escape() api function that lets you 'pass through' esc
    sequences if the driver supports it
    so you can easily wrap this in a RAP function to print esc codes in the
    report
    been there do it all the time
    cu
    marc

  • edited March 2006
    Nico,
    this a somthing you could easily implement in the RB core i suppose...
    cu
    marc

  • edited March 2006
    Jaime wrote:



    I suppose you could do it with RAP, but I have not tried it. I am just
    now converting our POS application to RB so it is something I will have
    to deal with. Another option is to open the cash drawer by passing
    through your escape code to your printer right before printing the
    report. We already use a routine for this to open the cash drawer
    outside of a POS transaction.
This discussion has been closed.