我在SSRS 2005中有报告。我正在使用远程报告。在IE中,显示“打印”按钮,但在Firefox和Chrome中,不显示“打印”按钮。
我的报告显示在jquery UI对话框中,所以我不能只执行window.print。我的报告在模态中很好地呈现。
我需要能够以与在控件内相同的方式向reportviewer发出打印命令,但只能在Firefox和chrome中使用。
我研究了报表查看器的标记,并找到了此代码。我尝试将其手动注入到reportviewer中,但没有成功。
<table id="reportViewer_ctl01_ctl07_ctl00_ctl00" onclick="document.getElementById('reportViewer').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&Version=9.0.30729.4402&Name=Microsoft.Reporting.WebForms.Icons.Print.gif" alt="Print" style="height:16px;width:16px;padding:2px;" /></td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?