SQL Reporting Services的 - 打印按钮在Mozilla未显示 [英] SQL Reporting Services - Print Button not shown in Mozilla

查看:191
本文介绍了SQL Reporting Services的 - 打印按钮在Mozilla未显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的 SQL Reporting Services的,它的工作完美,显示的的打印按钮,但在Mozilla Firefox浏览器没有显示。

I am using SQL Reporting services, it's working perfectly and shows a print button in IE, but not shown in Mozilla Firefox.

没有人有任何想法?

我已签出该解决方案,但它不工作:

I have checked out this solution, but it's not working:

<一个href=\"http://social.msdn.microsoft.com/Forums/en-US/vsreportcontrols/thread/7bdf431d-70db-419d-8e98-ef41cad8e2d8\">http://social.msdn.microsoft.com/Forums/en-US/vsreportcontrols/thread/7bdf431d-70db-419d-8e98-ef41cad8e2d8

推荐答案

我不认为它使用ActiveX,因为表onclick事件有一个简单的:

I don't think it uses ActiveX, because in the table onclick event there is a simple:

ReportFramerpvReport.GetReportFrame().contentWindow.print()

无论如何,我这替代打印的东西,我自己打印功能,因为这code以上未在FF工作。

Anyway, i replaced this print stuff with my own print function, because this code above wasn't working on FF..

我知道它的丑陋...但它的工作原理! (只需更换你的控件ID的控件名称值,一定要添加的jQuery的lib在你的页面)

I know it's ugly...but it works! (just replace the ControlName value with your ControlID and be sure to add jQuery lib in your page)

    $(document).ready(function()
    {
        if ($.browser.mozilla)
        {
            try
            {
                var ControlName = 'RptDespesas';
                var innerScript = '<scr' + 'ipt type="text/javascript">document.getElementById("' + ControlName + '_print").Controller = new ReportViewerHoverButton("' + ControlName + '_print", false, "", "", "", "#ECE9D8", "#DDEEF7", "#99BBE2", "1px #ECE9D8 Solid", "1px #336699 Solid", "1px #336699 Solid");</scr' + 'ipt>';
                var innerTbody = '<tbody><tr><td><input type="image" style="border-width: 0px; padding: 2px; height: 16px; width: 16px;" alt="Print" src="/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=9.0.30729.1&amp;Name=Microsoft.Reporting.WebForms.Icons.Print.gif" title="Print"></td></tr></tbody>';
                var innerTable = '<table title="Print" onmouseout="this.Controller.OnNormal();" onmouseover="this.Controller.OnHover();" onclick="PrintFunc(\'' + ControlName + '\'); return false;" id="' + ControlName + '_print" style="border: 1px solid rgb(236, 233, 216); background-color: rgb(236, 233, 216); cursor: default;">' + innerScript + innerTbody + '</table>'
                var outerScript = '<scr' + 'ipt type="text/javascript">document.getElementById("' + ControlName + '_print").Controller.OnNormal();</scr' + 'ipt>';
                var outerDiv = '<div style="display: inline; font-size: 8pt; height: 30px;" class=" "><table cellspacing="0" cellpadding="0" style="display: inline;"><tbody><tr><td height="28px">' + innerTable + outerScript + '</td></tr></tbody></table></div>';

                $("#" + ControlName + " > div > div").append(outerDiv);

            }
            catch (e) { alert(e); }
        }
    });

    function PrintFunc(ControlName)
    {
        setTimeout('ReportFrame' + ControlName + '.print();', 100);
    }

这篇关于SQL Reporting Services的 - 打印按钮在Mozilla未显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆