Preview is not shown when default printer is not available
I am using Embarcadero® Delphi 11.0 Version and ReportBuilder 21.02 Build 286.
When I do not have access to the default printer the preview does not show, - and the user interface becomes unresponsive. First, when the computer can see the default printer (e.g. using a VPN to access the printer at work), then, the preview is shown.
Below is a sample code on how the preview is generated.
Is there a solution to this, - to avoid that users do not face that problem?
var
ppViewerMain: TppViewer;
begin
...
Assert(ppViewerMain.Report.Device = dtScreen);
ppViewerMain.Report := AReport;
ppViewerMain.Report.PrintToDevices;
..
end
When I do not have access to the default printer the preview does not show, - and the user interface becomes unresponsive. First, when the computer can see the default printer (e.g. using a VPN to access the printer at work), then, the preview is shown.
Below is a sample code on how the preview is generated.
Is there a solution to this, - to avoid that users do not face that problem?
var
ppViewerMain: TppViewer;
begin
...
Assert(ppViewerMain.Report.Device = dtScreen);
ppViewerMain.Report := AReport;
ppViewerMain.Report.PrintToDevices;
..
end