Board index » delphi » help : QR2.0i : Print Dialog shows wrong printer

help : QR2.0i : Print Dialog shows wrong printer

Hi,

I allow the user to change the active printer via a
PrintSetupDialog.execute.
When printing a report I make sure it is printed to the correct printer
via :
  QuickRep1.PrinterSettings.PrinterIndex := Printer.PrinterIndex;

The Problem : when a Print dialog is shown via
- PrintSetup Button on the QR preview
- QuickRep1.PrinterSetup;
the wrong printer is selected.  It always shows the default one.  This
is very confusing, especially since the report will print correctly to
the previous selected printer.

I already tried :
  QRPrinter.PrinterIndex := Printer.PrinterIndex;            // before
calling preview
  QuickRep1.QRPrinter.PrinterIndex := Printer.PrinterIndex;  // in
beforeprint
but nothing works.

I think it is a bug.
I'm desperately looking for a workaround.
Please help,

thanks,

Jan Kempenaers

 

Re:help : QR2.0i : Print Dialog shows wrong printer


Quote
>Hi,

>I allow the user to change the active printer via a
>PrintSetupDialog.execute.
>When printing a report I make sure it is printed to the correct printer
>via :
>  QuickRep1.PrinterSettings.PrinterIndex := Printer.PrinterIndex;

>The Problem : when a Print dialog is shown via
>- PrintSetup Button on the QR preview
>- QuickRep1.PrinterSetup;
>the wrong printer is selected.  It always shows the default one.  This
>is very confusing, especially since the report will print correctly to
>the previous selected printer.

I had the same problem. I think that the QuickReports run fine, the
problem is the Delphi Printer.GetPrinter (ADevice, ADriver, APort:
PChar; var ADeviceMode: THandle) function. It returns information
about the selected printer (Printer.PrinterIndex) ADevice, ADriver,
APort values are fine, but ADeviceMode returns information about the
default or the previus printer. I think that you will must to change
the Delphi Printers unit to fix the bug.

Re:help : QR2.0i : Print Dialog shows wrong printer


Hi,

I am having the same problem too.
I can switch printers and print a form by calling the regular print command
from delphi.
But when I try and use Quick Reports I am unable to switch printers.

Thanks

Kannan Shunmugaraj

Quote
Jan Kempenaers wrote:
> Hi,

> I allow the user to change the active printer via a
> PrintSetupDialog.execute.
> When printing a report I make sure it is printed to the correct printer
> via :
>   QuickRep1.PrinterSettings.PrinterIndex := Printer.PrinterIndex;

> The Problem : when a Print dialog is shown via
> - PrintSetup Button on the QR preview
> - QuickRep1.PrinterSetup;
> the wrong printer is selected.  It always shows the default one.  This
> is very confusing, especially since the report will print correctly to
> the previous selected printer.

> I already tried :
>   QRPrinter.PrinterIndex := Printer.PrinterIndex;            // before
> calling preview
>   QuickRep1.QRPrinter.PrinterIndex := Printer.PrinterIndex;  // in
> beforeprint
> but nothing works.

> I think it is a bug.
> I'm desperately looking for a workaround.
> Please help,

> thanks,

> Jan Kempenaers

Re:help : QR2.0i : Print Dialog shows wrong printer


Hi,

I am having the same problem too.
I can switch printers and print a form by calling the regular print command
from delphi.
But when I try and use Quick Reports I am unable to switch printers.

Thanks

Kannan Shunmugaraj

Quote
Tolo Oliver wrote:
> >Hi,

> >I allow the user to change the active printer via a
> >PrintSetupDialog.execute.
> >When printing a report I make sure it is printed to the correct printer
> >via :
> >  QuickRep1.PrinterSettings.PrinterIndex := Printer.PrinterIndex;

> >The Problem : when a Print dialog is shown via
> >- PrintSetup Button on the QR preview
> >- QuickRep1.PrinterSetup;
> >the wrong printer is selected.  It always shows the default one.  This
> >is very confusing, especially since the report will print correctly to
> >the previous selected printer.

> I had the same problem. I think that the QuickReports run fine, the
> problem is the Delphi Printer.GetPrinter (ADevice, ADriver, APort:
> PChar; var ADeviceMode: THandle) function. It returns information
> about the selected printer (Printer.PrinterIndex) ADevice, ADriver,
> APort values are fine, but ADeviceMode returns information about the
> default or the previus printer. I think that you will must to change
> the Delphi Printers unit to fix the bug.

Re:help : QR2.0i : Print Dialog shows wrong printer


Hi,

I am having the same problem too.
I can switch printers and print a form by calling the regular print command
from delphi.
But when I try and use Quick Reports I am unable to switch printers.

Thanks

Kannan Shunmugaraj

Quote
Tolo Oliver wrote:
> >Hi,

> >I allow the user to change the active printer via a
> >PrintSetupDialog.execute.
> >When printing a report I make sure it is printed to the correct printer
> >via :
> >  QuickRep1.PrinterSettings.PrinterIndex := Printer.PrinterIndex;

> >The Problem : when a Print dialog is shown via
> >- PrintSetup Button on the QR preview
> >- QuickRep1.PrinterSetup;
> >the wrong printer is selected.  It always shows the default one.  This
> >is very confusing, especially since the report will print correctly to
> >the previous selected printer.

> I had the same problem. I think that the QuickReports run fine, the
> problem is the Delphi Printer.GetPrinter (ADevice, ADriver, APort:
> PChar; var ADeviceMode: THandle) function. It returns information
> about the selected printer (Printer.PrinterIndex) ADevice, ADriver,
> APort values are fine, but ADeviceMode returns information about the
> default or the previus printer. I think that you will must to change
> the Delphi Printers unit to fix the bug.

Re:help : QR2.0i : Print Dialog shows wrong printer


Hi,

I am having the same problem too.
I can switch printers and print a form by calling the regular print command
from delphi.
But when I try and use Quick Reports I am unable to switch printers.

Thanks

Kannan Shunmugaraj

Quote
Tolo Oliver wrote:
> >Hi,

> >I allow the user to change the active printer via a
> >PrintSetupDialog.execute.
> >When printing a report I make sure it is printed to the correct printer
> >via :
> >  QuickRep1.PrinterSettings.PrinterIndex := Printer.PrinterIndex;

> >The Problem : when a Print dialog is shown via
> >- PrintSetup Button on the QR preview
> >- QuickRep1.PrinterSetup;
> >the wrong printer is selected.  It always shows the default one.  This
> >is very confusing, especially since the report will print correctly to
> >the previous selected printer.

> I had the same problem. I think that the QuickReports run fine, the
> problem is the Delphi Printer.GetPrinter (ADevice, ADriver, APort:
> PChar; var ADeviceMode: THandle) function. It returns information
> about the selected printer (Printer.PrinterIndex) ADevice, ADriver,
> APort values are fine, but ADeviceMode returns information about the
> default or the previus printer. I think that you will must to change
> the Delphi Printers unit to fix the bug.

Other Threads