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

Use a print dialog to set the ppReport printer?

edited April 2003 in General
Sorry if this is a really stupid question, but I want the user to be able to
choose a printer and then assign it to the Rbuilder 7 report (each report
has to be printed multiple times on the same printer but with different
info, and I don't want to keep asking the user as they are unlikely to be
using the "default" printer. ( I'm using a JIT approach from a StringGrid as
assembling the data is quite complex).

Question: how do you get the printername out of the "printdialog" or
"printersetupdialog" components in Delphi so I can pass it to
"rbCustomerList.PrinterSetup.PrinterName := " I thought the dialog
components would give you access to the selected printer like the "openfile"
dialog does for filenames...

TIA

Barry

Dr Barry Clark
Senior Lecturer & IT Systems Designer
Medical Education Unit
Wolfson Medical Building
University of Glasgow
Glasgow G12 8QQ
Tel: 0141-330-4248
Email: b.clark@clinmed.gla.ac.uk

Comments

  • edited April 2003
    Fixed it myself (thanks to http://www.chami.com/tips/delphi/011797D.html)

    ComboBox1.Items := Printer.Printers;

    Then assign name from list.

    B
    --

    Dr Barry Clark
    Senior Lecturer & IT Systems Designer
    Medical Education Unit
    Wolfson Medical Building
    University of Glasgow
    Glasgow G12 8QQ
    Tel: 0141-330-4248
    Email: b.clark@clinmed.gla.ac.uk
This discussion has been closed.