Skip to Content
0

Problems with default printers on Windows Server 2016

Jan 15 at 05:48 PM

530

avatar image

I'm having an issue with the CrystalReportViewer control when running an winforms application on windows 2016 server. When remoting into the server using Rempte Desktop Connection, we're selecting the option to use local devices and resources, including printers. This makes the default printer on the server the same as the default printer on the machine I'm remoting from. But when running my application to view the report, when I click the print button, my default printer is not automatically selected. Now, when I change the default printer to a printer already on the server, it works fine. It just doesn't seem to work with redirected printers. If I manually select one of the redirected printers, my report does print to the printer.

So far I've tried updating the runtime on the server, and setting the ReportDocument.PrintOptions.PrinterName. I wasn't previously setting that property unless it was printing directly (not going to the viewer). I've also been told (but not witnessed myself) that this did work in Windows Server 2012. Is there a better way to set the printer even though I want to initially view vs print?

Thanks in advance!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Don Williams
Apr 17 at 09:01 PM
0

I had a case with this same issue. It appears MS and Citrix will always use the Default printer on the Remote Server you are logging into. Nothing we can do about it.

The case was closed and the Partner was taking it up with Microsoft. I asked for updates but nothing so far...

And we found the same keys, we tried adding the old ones and nothing changed. Nothing CR can do it's the Remote Server selecting it's default printer.

Use Google and search for this KBA:

2631171 - Default printer always selected when using Remote Desktop or Cirtix client into a CR for VS application

Don

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Well I googled and I wasn't able to find anything referencing that exact KBA. I also wasn't able to access it on the SAP ONE Support Launchpad because I don't have the right username? I'm working on trying to get that figured out. Anyways, I appreciate your help! Thank you!

0

Oops, sorry about that. I forgot to release it. You can find it now...

0
Don Williams
Jan 16 at 07:01 PM
0

Don't use the Windows Redirected driver, they are a piece of c....

Install the printers on the PC you are remoting into

Don

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks Don.

Did you have an answer to my question about setting the printer even though I just want to view?

Jessica

0
Don Williams
Jan 22 at 05:21 PM
0

When viewing reports the formatting engine uses the printer driver so it is required on the app server.

Using Redirected printer can cause a huge performance issue.

If using No Printer is used then it uses the usp10.dll/GDIPlus.dll to format plus some of the PC's Default printer properties.

It's always been this way.

Don

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Don, we did some digging and found that the registry key used to store the default printer is different in Windows Server 2016 vs 2012. In 2012 it's HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows (Device) and in 2016 it's HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows\SessionDefaultDevices\S-X-X-X-X-xxxxxxxxx. Do you think that has anything to do with the default printer being incorrect when it's a redirected printer?

0