询问者
打印报表

问题
全部回复
-
建临时表,根据需要填2页数据到同一行
http://feiyun0112.cnblogs.com/ -
麻烦问两个问题:
1. 你打印的是什么? word文档? excel文档? datagridview?
2. 你所用VB版本是什么?
Best regards,
Mike Feng [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
-
<script type ="text/javascript"> function PrintTagData(id) { var Item = document.getElementById(id); var printdetail = window.open("", "TextareaDetail"); printdetail.document.open(); printdetail.document.write("<HTML><head><link href=../../css/admin.css rel='stylesheet' type='text/css'>"); printdetail.document.write("<script type ='text/javascript'>"); printdetail.document.write("function mouseover(obj,color_word){obj.style.backgroundColor = color_word;}"); printdetail.document.write("function mouseout(obj,color_word){obj.style.backgroundColor = color_word;}"); printdetail.document.write("<\/script>"); printdetail.document.write("</head>"); printdetail.document.write("<BODY onload=\"window.print();\">"); printdetail.document.write(Item.outerHTML); printdetail.document.write("</BODY></HTML>"); printdetail.document.close(); } </script>
特別打印小弟推薦使用javascript來完成,插入這段javascript,最後於想打印的部分外面包裝一個<div id="print_data">於觸發按鈕上加入 <a href="javascript:PrintTagData('print_data');"></a> 即可
coding or not -
进一步问个问题: 你是先打印一个报表 再打印另一个报表, 因为第一个报表没有用完一整张纸,所以希望第二个报表继续在前一张纸上继续打印是吗?
Mike Feng [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
-
如果是这样, 那么目前这个几乎还不太现实...
Mike Feng [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
-
用程序動態改變紙張大小也許可能達到您的需求! 但我不知道怎搞
網上搜尋有一說是使用點陣式打印機就會連續列印了
也許您可以參考看看這篇,自己改要打印的範圍 http://hi.baidu.com/gladin/blog/item/3431aa16ae75800f4b90a7b1.html
coding or not