RDLC ReportViewer Print Button not working in IE10 and IE11 browsers

Last Reply on Mar 06, 2014 11:04 PM By Priyanka12

Posted on Mar 06, 2014 08:26 AM

I had created Report in my website using "Report Viewer control". It is showing "Print" option in Design but its not showing "Print" option when I run the web page.

Please tel how to set "Print" option in Report Viewer control in ASP.NET C#.

Also, Table in Report viewer gets shrink in "Chrome", Table in Report Viewer shows Vertical scroll in "firefox".

I want to make it compatible in all 3 browsers.

Please suggest some way to make it compatible in 3 browsers with "Print" option.

Please help.

I had refered below article:

http://www.aspsnippets.com/Green/Articles/ASPNet-Report-Viewer-control-Tutorial-with-example.aspx

Posted on Mar 06, 2014 10:47 PM

IE 10 and 11 have problems with Active X and hence the Button is not showing.

You can try the solution here

http://forums.asp.net/t/1911810.aspx

And if that does not work you can manually add a button and use the following solution.

Print RDLC Report without using ReportViewer Control

Other than this there's nothing on internet on this topic

 


Posted on Mar 06, 2014 11:04 PM

@Mudassar

thankyou for the reply sir.

I used below javascript code by manually adding "Print" button and its working fine:

 

<body>
    <form id="form1" runat="server">

        <script type="text/javascript">
            function doPrint() {
                var prtContent = document.getElementById('<%= ReportViewer1.ClientID %>');
        prtContent.border = 0; //set no border here
        var WinPrint = window.open('', '', 'left=150,top=100,width=1000,height=1000,toolbar=0,scrollbars=1,status=0,resizable=1');
        WinPrint.document.write(prtContent.outerHTML);
        WinPrint.document.close();
        WinPrint.focus();
        WinPrint.print();
        WinPrint.close();
    }
   </script>    
 <asp:Button ID="PrintButton" runat="server" Text="Print" OnClientClick="doPrint();" ToolTip="Print Report"/>

</body>

 

I agree, here is the link: https://www.e-iceblue.com/Introduce/spire-office-for-net-free.html