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

Set printer manually or through tprintDialog

edited June 2004 in General
Hi

Actually I want to set the printer name, copies, etc manually, or through
delphi's PrintDialog component.

Or is there any other way I can print three reports (one after another by
one button click) directly to printer by showing printer dialog just once
and using it for all three reports.

Thank You
Regards
Kumar

Comments

  • edited June 2004

    The Delphi PrintDialog can be used only with Delphi's TPrinter.
    ReportBuilder does not use Delphi's TPrinter because it is a poorly written
    buggy implementation of a printer class.

    ReportBuilder uses its own TppPrinter class.

    1. To display a similar dialog, you can call Report.Printer.ShowSetupDialog.

    2. To display the ReportBuilder print dialog, have a look at the
    TppProducer.PrintToPrinter method located in ppProd.pas.

    3. There are two options for combining multiple reports into one print job:

    a. Create a main report, remove the header and footer, and add multiple
    section style subreports to the main report. This solution enables preview
    as well as print to printer.

    www.digital-metaphors.com/tips/SubReference.zip

    b. Take manual control over the print job. This solution enables only print
    to printer, it does not support preview. Check out demo 123 (dm123.pas) in
    the RBuilder\Demos\Reports\Demo.dpr project.






    --

    Nard Moseley
    Digital Metaphors Corporation
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.