Thursday, February 2, 2012

How to use client-side printing of Microsoft Reporting Service Silently in Internet Explorer


In report viewer, there is a print button on top right of the toolbar when you browse report in IE. Using this button to print the report on the browser rather than use pdf viewer(i.e. Adobe Reader) to print after saving as pdf format.But if you want to do like that you have to download and install SSRS ActiveX.

Diagram 1: Toolbar of the report viewer

When you click the print button, the
configuration dialog of printing will pop-up after you have already installed the SSRS ActiveX in your computer.
Diagram 2:

If you have not installed the ActiveX in your computer.A information bar will be displayed on top of the report viewer.

Diagram 3: Information bar of IE

The SSRS ActiveX control is the same as the other web ActiveX control. If you want to install the ActiveX you have to have the admin right, but the policies of most of companies do not allow to grant the admin privilege to the end users. So the end users running on the client computers cannot download and install the ActiveX file by himself/herself.The question is how could administrator help the end users to solve this problem?

1. Get the ActiveX file(i.e. RSClientPrint.cab) from the bin folder
in reporting server. (1). Navigate to "Microsoft SQL Server" folder in the Program Files, and look for the folder with prefix name is "MSRS". double click it and then paste below pathway in the location input box.
Reporting Services\ReportServer\binYou could find a file named "RSClientPrint-x86.cab" in it.It is the ActiveX file what we need.
E.g.
C:\Program Files\Microsoft SQL Server\MSRS10.SQLEXPRESS\Reporting Services\ReportServer\bin

Diagram 4:ReportServer Folder

(2). Extract the "RSClientPrint-x86.cab" file and you will see it consists of the following files.

RSClientPrint-x86.inf
rsclientprint.dll
rsclientprint_1028.rll
rsclientprint_1031.rll
rsclientprint_1033.rll
rsclientprint_1036.rll
rsclientprint_1040.rll
rsclientprint_1041.rll
rsclientprint_1042.rll
rsclientprint_1046.rll
rsclientprint_1049.rll
rsclientprint_2052.rll
rsclientprint_3082.rll

2. Login the client machine as administrator.
3. Copy rsclientprint.dll and *.rll file mentioned above to the system32 folder.
The 64-bit version is:%systemroot%\
SysWoW64\
The 32-bit version is:%systemroot%\
System32\

4.Register the RSClientPrint.dll file by running the regsvr32.exe command as administrator.
Diagram 5:

Note:If you want to get more information about regsvr32, you can visit below link.
Explanation of Regsvr32 usage and error messages


After above steps done, You had downloaded and installed ActiveX of SSRS. However, You still need privilege to run the ActiveX in the IE.
Diagram 6:Information bar of IE

Actually, You can set IE browser to trust the website in the security tab for per user. But it is not a good idea to solve the problem for who want to use this computer with their access right. Instead you can set one time in the group policy of Microsoft Management Console for all users using administrator privilege.
1. Typed "mmc" in the command prompt.
Diagram 6: Microsoft Management Console (MMC)

2. In the MMC, On "File" menu, Click "Add/Remove Snap-in..."
3. In the "Snap-ins" dialog box, select "Group Policy Object Editor" to add, then click OK button.

Diagram 7: Snap-ins dialog box

4. Navigate  "User Configuration->Windows Settings->Internet Explorer Maintenance->Security".
Diagram 8: Group Policy dialog box

5. Double click "Security and Privacy Settings".
6. Tick "Import the current security zones and privacy settings" in the Security Zones dialog box. Then the alert window wills pop-up. Click "Continue".

7. At the same time "Modify Settings" button is enable, click "Modify Settings" button.
8. In the pop-up "Internet Properties" dialog box. Click "Trusted Sites" icon and add site. Click "OK" button to close all dialog box.
Diagram 9: Internet Properties Settings

Finally, Through above step, everyone who has access right to login to the computer can print the report on browser and unnecessary to install AxtiveX again.

3 comments:

  1. Hi, Im getting an error when trying to install the reportviewer on a Server 2008 R2 service pack 1 install for XenApp 6.5.. it starts installing then I get an error "An error occurred while copying file RSCLientPrint-x86.inf" i can cancel this and continue the install and it works but I dont want this prompt for the user. Have you seen this issue ?

    ReplyDelete
  2. Sorry.I have not seen this error.I think you should re-install the report viewer again and do not run anything during the installation.
    There are many version of report viewer in the Microsoft website and please pay attention to the system requirements section.

    Report Viewer 2012:http://www.microsoft.com/en-us/download/details.aspx?id=35747

    Report Viewer 2010:http://www.microsoft.com/en-us/download/details.aspx?id=6442

    Report Viewer 2008:http://www.microsoft.com/en-us/download/details.aspx?id=6576

    ReplyDelete
  3. Thanks , I also had to give users write access to C:\Windows\Downloaded Program Files\ as well

    ReplyDelete