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

Retrieving Printer Name

edited May 2006 in General
How do I retrieve the name of the printer chosen in the printer dialog? And
how do I initialize this? For example, the first time an app is run,
you'll see the name of the default printer. If the user changes the printer
to something other than the default, I need to use that newly-chosen
printer the second time the app is run. I tried "ppreport1.printerdialog."
but there is no printername property there. I have Acrobat Distiller
installed s a printer driver. If I chose to use this driver the first time
in the printer dialog, I always want to default to this driver for
subsequent runs of this application.

Thanks!
Debbie Erickson

Comments

  • edited May 2006
    Hi Debbie,

    Two options:

    1. Access the Printer object of the TppCustomPrintDialog and use its
    PrinterName property.

    uses
    ppPrintr;

    lsPrinterName := TppPrinter(ppReport1.PrintDialog.Printer).PrinterName;

    2. Access the actual combo box used to display the printers in the
    TppPrintDialog.

    uses
    ppPDlg;

    lsPrinterName := TppPrintDialog(ppReport1.PrintDialog).cbxPrinters.Text

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2006
    Hi Debbie,

    Two options:

    1. Access the Printer object of the TppCustomPrintDialog and use its
    PrinterName property.

    uses
    ppPrintr;

    lsPrinterName := TppPrinter(ppReport1.PrintDialog.Printer).PrinterName;

    2. Access the actual combo box used to display the printers in the
    TppPrintDialog.

    uses
    ppPDlg;

    lsPrinterName := TppPrintDialog(ppReport1.PrintDialog).cbxPrinters.Text


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