找回密码
 立即注册

QQ登录

只需一步,快速开始

hu_service

论坛元老

12

主题

19

帖子

5748

积分

论坛元老

积分
5748

活字格认证

hu_service
论坛元老   /  发表于:2014-3-22 16:31  /   查看:5651  /  回复:1
MVC中HtmlViewer方式怎么实现打印

1 个回复

倒序浏览
roger.wang
社区贡献组   /  发表于:2014-3-24 10:02:00
沙发
回复 1楼hu_service的帖子


需要通过JavaScript添加打印功能,这里有demo可参考。


  1. script type="text/javascript" language="javascript">
  2.        $(document).ready(function fn() {
  3.            $(".arvToolBar").append("<span><input id='btnPrint' type='Button' value='Print' onclick='print()'/></span>");
  4.        });

  5.        function print() {
  6.            
  7.            w = window.open("WebForm1.aspx?Task=Print");
  8.            w.focus();

  9.            $(w.document).ready(function () {
  10.                window.setTimeout("w.print()", 2000);

  11.            });

  12.        };

  13.    </script>
复制代码


参考文档路径:
ActiveReports 7 > ActiveReports User Guide > Getting Started > Viewing Reports > ActiveReports and the Web > Using the HTML Viewer > Working with HTML Viewer using Javascript

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部