Asp.net报道Viwer印刷版 [英] Asp.net report Viwer print buttion

查看:71
本文介绍了Asp.net报道Viwer印刷版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

//controls who helds all the tables and divs where our report contents or data is available
   var newstr = $("#ReportViewer1_ctl10").html();







这个是我的代码






This is my code

<script language="javascript" type="text/javascript">
        function printReport() {
            var headstr = "<html><head><title></title></head><body>";
            var footstr = "Test; //</body>
            var newstr = $("#ReportViewer1").html();//i think this is error line
            var popupWin = window.open('', '_blank');
            popupWin.document.write(headstr + newstr + footstr);
            popupWin.print();
            return false;
              }
       </script>

推荐答案

#ReportViewer1_ctl10 )。html();
("#ReportViewer1_ctl10").html();







这是我的代码






This is my code

<script language="javascript" type="text/javascript">
        function printReport() {
            var headstr = "<html><head><title></title></head><body>";
            var footstr = "Test; //</body>
            var newstr =


(#ReportViewer1)。html(); //我认为这是错误行
var popupWin = window.open('','_ blank');
popupWin.document.write(headstr + newstr + footstr);
popupWin.print();
return false;
}
< / script >
("#ReportViewer1").html();//i think this is error line var popupWin = window.open('', '_blank'); popupWin.document.write(headstr + newstr + footstr); popupWin.print(); return false; } </script>


如果您想要打印ReportViewer内容,有更好的方法可以在相关问题中发布此处报表查看器打印按钮未显示在firefox和chrome [ ^ ]
If you want to print the ReportViewer content, there are better ways for doing that as posted here in a related question Report viewer print button is not showing in firefox and chrome[^]


这篇关于Asp.net报道Viwer印刷版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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