Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Preview is not shown when default printer is not available

bphbph
edited November 17 in General
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
Sign In or Register to comment.