on ‎2023 Feb 03 3:06 PM
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.
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 13 | |
| 8 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.