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

need to send escape sequesces before RB can kick in

edited July 2004 in General
so,
what i need to do is position the paper correctly (its a slip printer)
i can do this by sending Esc sequences to the printer using the Escape()
function
but i would like to do the layout in RB
so i need to be able to push the escape codes to the printer of the report
before the report itself is printed,
is this possible with RB?
tia,
marc

Comments

  • edited July 2004
    Hi Marc,

    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.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2004
    Nico,
    sending the escape codes itself is a piece of cake
    what i want to know is that if it is possible to get to the printer directly
    to use this Escape() win api
    so i can push out the esc codes and then let RB do its job...
    tia,
    marc

  • edited July 2004
    Hi Marc,

    Sorry for the delay in this response. You will need to wait until the
    PrinterDevice is created before you can get ahold of the printer handle. I
    would suggest trying in the Report.BeforePrint event. From there you can
    access the TppPrinterDevice.Printer.Canvas.Handle property. From here, you
    are probably going to want to use the TppPrinterDevice.OnReceivePage event
    to move forward with pushing out the escape codes. Hope this helps.

    --
    Best Regards,

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