Delphi .NET (2) Database (71) Delphi IDE (90) Network (39) Printing (3) Strings (12) VCL (83) Windows with Delphi (280)
Exchange Links About this site Links to us 
New related comments Number of comments in the last 48 hoursAccess a password-saved paradox database without knowing the password 1 new comments
QuickReport: Load a .QRP file 1 new comments
|
QuickReports: PrinterIndex out of range
This article has not been rated yet. After reading, feel free to leave comments and rate it.
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:
- Add Unit Printers to your Form that controls Printing. Add an TCombobox
and name it 'cbxPrinters'
- In FormCreate add the following statement:
cbxPrinters.Items.Assign(Printer.Printers);
- The User has to choose the desired Printer with this Combobox.
- Insert before the print-statement the following statement ('qrp' is the name of the TQuickRep-Object)
qrp.PrinterSettings.PrinterIndex:=cbxPrinters.ItemIndex;
- REMARK: the quickreport-preview-printersetupdialog will not be affected.
Test it and instruct your users.
Comments:
|