.NetGurus

Diğer Yazılar

Google a Ekle

Add to Google



Reportviewer Print Problem After KB956391 (ActiveX Kill Bits Update)

For reporting purposes, I use Reportviewer control. But as you know it has a handicap that is you cannot print the report directly. To tackle this, I and one of my collegaues have developed a solution for this problem. The solution is to use the Print job ActiveX of the ReportServer in the report page. 

I am not going to tell much about the details since this is a known issue. The page is as following;

<html>

<head>

    <object id="RSClientPrint" classid="CLSID:FA91DF8D-53AB-455D-AB20-F2F023E498D3" codebase="http://myAppUrl/RSClientPrint.cab" viewastext></object>

    <script type="text/javascript">

        function Print(reportid) {

            RSClientPrint.Authenticate = false;RSClientPrint.Print('http://myAppUrl/ReporGenerator.aspx?Param=PuUfK1YXSlAWfq4MFTcM9w%3d%3d', 'reportId=' + reportid, 'Rapor'); }

    </script>

</head>

<body>

    <form name="aspnetForm" method="post" action="Rapor.html" id="aspnetForm"> .......

        <input type="button" value="Bas" onclick="Print('f956661a-501e-402e-9849-551ca88ea72f');" />

................

    </form>

</body>

</html>

Here, the key point or key element is the RsClientPrint ActiveX. This object is used by ReportServer. 

But unfortunatelly a few days ago one of our clients reported that the print function was not working. When you clicked on the Print Button, you got an Javascript error saying "object does not support this function" or something like that. The source of the problem was the ActiveX object. After some investigation I have found that an update with code KB956391 broke down the ActiveX. I have tried different ways as described in; http://www.technologystudio.net/blog/post/Microsoft-Update-KB956391-breaks-Reporting-Services-ReportViewer.aspx.  Uninstalling then reinstalling, cleaning related registry and reinstalling etc. All of them was successfull but when you update the system the problem re-occurs. This means that there is a conflict between the ActiveX and the update, I mean you cannot use this ActiveX no more because it is not compatible no more.

Anyway, I have begun to find a newer version of the ActiveX that is compatible with this update. (The logic is simple; if the old one is unuseful there must be one that is useful :) As Microsoft cannot say "you cannot print your reports anymore", they must have the solution. So, the Report Server 2005(SP1) should have to overcome this problem, too. With this thought in my mind, I have searched the report server folder and found a newer version of the ActiveX at location; "C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin". After making the below changes in the application in order to use the new activex, the problem dissapeared.

SOLUTION:

- Uninstall the old ActiveX if exists in C:\WINDOWS\Downloaded Program Files\ folder. (Actually you dont need to do this, I mean it is not a must but in case...)

- Replace the older RSClientPrint.cab file in your application(where the codebase points to) with the new one(the cab file you get from the report server 2005 folder mentioned somewhere above).

- Lastly, chage the CLSID of the Object as 41861299-EAB2-4DCC-986C-802AE12AC499 (old clsid was;FA91DF8D-53AB-455D-AB20-F2F023E498D3)

After these changes when you open your report page ActiveX Installation window should popup. But it may have been installed before by another application. So if the installation windows does not popup don't panic just try to print :) if the print window opens it' s OK, if not then check out the above steps or something I have forgotten :). After succesfully accomplishing this, your clients will begin to use the new ActiveX "RSClientPrint 2005 Class". That' s all.

 

For diagnostic purposes, here is the properties of the old and the new ActiveX objects.

   Old ActiveX  New ActiveX
FileName   RSClientPrint.cab  RSClientPrint.cab
Class Name  RSClientPrint Class  RSClientPrint 2005 Class
CLSID  {FA91DF8D-53AB-455D-AB20-F2F023E498D3}         {41861299-EAB2-4DCC-986C-802AE12AC499}
Version  2005.90.1399.0  2005,90,3073,0
Version of the rsclientprint.dll included   2005.90.1399.0  2005,90,3073,0
Version of the gdiplus.dll included  5.2.3790.1830  5.1.3102.3352
     

!!! I do not attach the new "RSClient 2005 Class" ActiveX because of the License Agreement things ... If you have a licensed Report Server you can install the related SP1 (if not did yet) then you have the new ActiveX in your hands-computer- legally !!!


Posted by yavuz on 22 Ekim 2008 Çarşamba 14:55
Permalink | Yorumlar (1) | Post RSSRSS comment feed

Yorumlar

rahul A.B.D.

01 Kasım 2008 Cumartesi 23:35

rahul

We opened a Microsoft ticket and this is what we got. Just installing the latest updates fixed the print without any registry manipulation.  --------------------------------------------------------------------------------------  First check the report server version. It must be 9.00.3073 or 9.00.3282. If not, update the report server:         Security Update for SQL Server 2005 Service Pack 2 (KB954607)    www.microsoft.com/.../details.aspxID=5148b887-f323-4adb-9721-61e1c0cfd213         Now check the version of the ReportViewer control.    You do this by having the customer open a report for viewing on a client machine.    Then have them right click on the report and select “View Source”.    Locate the line that looks like this:    <script src="/TestRSClientPrintReportViewer/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=X.Y.ZZZZ         Now, if the control type is “Reserved.ReportViewerWebPart.axd” then this is an issue with SharePoint.    The “Microsoft SQL Server 2005 Reporting Services Add-in for Microsoft SharePoint Technologies” has been updated to work with the new rsclientprint.dll.      Download center link:    www.microsoft.com/downloads/details.aspx?Family" rel="nofollow">www.microsoft.com/downloads/details.aspx?FamilyID=1e53f882-0c16-4847-b331-132274ae8c84&displaylang=en         If the control type is “Reserved.ReportViewerWebControl.axd” we should check the following:    We have 2 different major versions here: 8.00.50727 and 9.00.XXXX.    If you see version 8.00.50727 this means you are browsing reports from within CRM or using the ReportViewer control in a custom 2005 web application.    If you see version 8.00.50727 and the version is earlier than 8.00.50727.1843 then you should install Report Viewer Redistributable 2005 Service Pack 1 on the ReportServer or on the CRM server:         Microsoft Report Viewer Redistributable 2005 Service Pack 1    www.microsoft.com/.../details.aspx         If you see version 9.00.XXXX or 9.0.XXXX then you are browsing through Report Manager, Report Server or perhaps a customer web application built with VS 2008.    Then you should install the below on the report server:         Microsoft Report Viewer 2008 SP1 Redistributable    www.microsoft.com/downloads/details.aspx?Family" rel="nofollow">www.microsoft.com/downloads/details.aspx?FamilyID=bb196d5d-76c2-4a0e-9458-267d22b6aac6&DisplayLang=en         This will bring you up to version 9.0.30729.1 for the ReportViewer control.         After having updated the ReportViewer control you must issue an iisreset command so that the updated controls will take effect.    

Yorum ekle


(Gravatar simgesini gösterecek)

  Country flag

biuquote
  • Yorum
  • Canlı önizleme
Loading