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

POS like Print a line at a time.

edited February 2003 in General
Some thing like when a record is appened into the table then immeadiately
print that record content like in a POS invoice, also it has to check for
the page break and other normal routine of a report.

Any clues ? Sample code will be helpful and appreciated.

Thanks in advance,

Moorthy
~~~~~~

Comments

  • edited February 2003

    The RB report engine checks for page breaks based upon the page size that
    you specify for the report. The equivalent to a line in RB is a detail band.

    If you need print each record with a call to Report.Print, then you could
    try creating a report layout that has a page size that is essentially one
    record tall. Note that each page will generate a page break. If this is an
    issue, then you will need to create a custom TmyPosPrinterDevice class that
    is essential a copy of TppPrinterDevice that does not issue the
    Print.startpage, Printer.endpage commands. See RBuilder\Source\ppPrnDev.pas.
    To use your TmyPosPrinterDevice class you will need to create an instance of
    it at runtime, assign its Publisher property to Report.Publisher and call
    Report.PrintToDevices. See demos 123 and 124 in
    RBuilder\Demos\Reports\Demo.dpr.



    --
    Nard Moseley
    Digital Metaphors
    http://www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited February 2003
    Thanks.
    But I hope there is something easier with some exact sample code, after all
    this is a very basic and essential feature most of the business application
    would insist. RB should build some thing to solve this sorts of problems
    with ease. :)

    Thanks.



This discussion has been closed.