jqueryprintingreportviewerreportingservices-2005

SSRS print button in Chrome and Firefox


I have reports in SSRS 2005. I am using remote reports. In IE, the print button shows, but in Firefox and Chrome, the print button does not show.

My reports are shown in jquery UI dialogs, so I cannot just do a window.print. My reports render just fine within the modals.

I need to be able to issue a print command to the reportviewer the same way it is done from within the control, but only in firefox and chrome.

I dug into the markup for the report viewer, and found this code. I tried to manually inject it into the reportviewer with no success.

<table id="reportViewer_ctl01_ctl07_ctl00_ctl00" onclick="document.getElementById(&#39;reportViewer&#39;).ClientController.LoadPrintControl();return false;" onmouseover="this.Controller.OnHover();" onmouseout="this.Controller.OnNormal();" title="Print" style="display:none;">
                                <script type="text/javascript">
                                    document.getElementById('reportViewer_ctl01_ctl07_ctl00_ctl00').Controller = new ReportViewerHoverButton("reportViewer_ctl01_ctl07_ctl00_ctl00", false, "", "", "", "#ECE9D8", "#DDEEF7", "#99BBE2", "1px #ECE9D8 Solid", "1px #336699 Solid", "1px #336699 Solid");
                                </script><tr>
                                    <td><input type="image" name="reportViewer$ctl01$ctl07$ctl00$ctl00$ctl00" title="Print" src="/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=9.0.30729.4402&amp;Name=Microsoft.Reporting.WebForms.Icons.Print.gif" alt="Print" style="height:16px;width:16px;padding:2px;" /></td>
                                </tr>
                            </table>

Any ideas?


Solution

  • Unfortunately the print button is not supported in browsers other than IE.

    I think you realise this and did a workaround, we have yet to come up with a decent solution as well. Although most of our users prefer printing from Excel directly, so we allow them to export the file which they then do the printing.

    This SO question would be a good link:

    SQL Reporting Services - Print Button not shown in Mozilla