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

Using printer driver definition of duplex

edited August 2006 in General
Hello all,

Is it possible to configure RB to use automaticaly the printer driver
definition for duplex?

thanks,
Ant?nio

Comments

  • edited August 2006
    --------------------------------------------------
    Tech Tip: Windows Default Printer Settings
    ---------------------------------------------------

    1. Default Printer Name

    You can get the name of the computers default
    printer by accessing ReportBuilder's global
    printer list object - ppPrinters.


    uses
    ppPrintr;


    var
    lsPrinterName: String

    begin

    lsPrintername := ppPrinters.DefaultPrinterName;

    end;



    2. Default Printer Setup


    Place the following code in the OnClick event-handler
    of a button on a form. When the button is pressed
    a message will be displayed showing the default
    printer name and paper size.

    You can get the other document defaults via
    the TppPrinter.PrinterSetup properties.


    uses
    ppPrintr;

    var
    lPrinter: TppPrinter;

    begin

    lPrinter := TppPrinter.Create;

    lPrinter.PrinterName := ppPrinters.DefaultPrinterName;

    ShowMessage(ppPrinters.DefaultPrinterName + ': ' +
    lPrinter.PrinterSetup.PaperName);

    {assign default printer settings to a report}
    myReport.PrinterSetup := lPrinter.PrinterSetup;


    lPrinter.Free;

    end;

    --
    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.