cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problems with default printer on Windows 2019

former_member842040
Discoverer
0 Likes
2,896

I saw similar posts related to Windows Server 2016. However, I didn't see resolution there other than to get SP24.

We're having an issue with setting CrystalReportViewer control default printer. We're running winforms application on Windows Server 2019 in Azure environment and remoting into the server using Remote Desktop Connection.

Previous environment was on prem on Windows Server 2008.

We run a .net application, all reports written in Crystal Reports 11 SP2.

When running the application to view the report and clicking the print button, default printer is not automatically selected.

It always points to "Microsoft Print To PDF". If I select another printer as my default, it only remembers it as long as I have my session open.

If client manually selects one of the redirected printers, their reports do print to the selected printer.

On 2008 servers under HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Devices there are plenty or redirect values.

Under 2019 the registry looks different. I can see the new key and value under HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\SessionDefaultDevices\.... and default printer I selected.

However, it disappears as soon as I close the application.

We also cannot set default printer in ReportDocument.PrintOptions.PrinterName, same code base is shared among multiple clients.

Any suggestion here please? Can we try latest SP considering that we're on a quite old version of Crystal?

Thank you in advance.

View Entire Topic
DonWilliams
Active Contributor
0 Likes

CR for VS doesn't like Microsoft's Redirected Printers also known as Easy Print because it doesn't actually create an entry into the DEVMODE structure. Easy Print is kind of an InProc Printer so CR doesn't have access to it.

Crystal is still built using C++ and accesses all the old C++ structures.

You have to install the real printer driver.

Don

former_member842040
Discoverer
0 Likes

thank you Don, will see what can be done.