DelphiFAQ Home Search:
General :: Programming :: Delphi :: Database
Database development with Delphi. Includes issues with BDE, ADO and InterBase.

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Only the 40 most recently viewed articles are shown.
You can see the full list here.

Featured Article

QuickReports: PrinterIndex out of range

The solution for PrinterSetting in Quickreport is unfortunate. The workarounds, discussed in
newsgroups, didn't work with Windows NT.
(PrinterIndex out of range: The Printer-Setup-Dialog seems to add Printernames with a connectionstring. Perhaps, there is a problem in Borlands Printers-Unit or in a corner of the Microsoft-jungle too).

This is a simple solution:

  1. Add Unit Printers to your Form that controls Printing. Add an TCombobox
    and name it 'cbxPrinters'
  2. In FormCreate add the following statement:
    cbxPrinters.Items.Assign(Printer.Printers);
  3. The User has to choose the desired Printer with this Combobox.
  4. Insert before the print-statement the following statement ('qrp' is the name of the TQuickRep-Object)
    qrp.PrinterSettings.PrinterIndex:=cbxPrinters.ItemIndex;
  5. REMARK: the quickreport-preview-printersetupdialog will not be affected.
    Test it and instruct your users.

Generated 12:01:13 on Feb 22, 2018