Frequently Asked Questions
No default printer selected
Question:
I get a exception error when running our application on a
machine without a default printer.
Answer:
QuickReport requires that a default printer be installed. The
report is prepared using information from the printer driver.
The following code is one way to check and see if a default
printer has been defined.
procedure TForm1.Button1Click(Sender: TObject);
var
Device, Driver, Port : array [0..255] of Char;
Mode : Integer;
begin
Printer.GetPrinter(Device,Driver,Port,Mode);
if Device <> '' then
ShowMessage(Device)
else
ShowMessage('You do not have a default printer defined');
end;