WEB打印?
在WEB中,怎么调用打印功能?
------解决方案--------------------用ReportView控件吧。
或把报表直接转化成PDF
------解决方案--------------------js调用 window.print();
可以打印,不过不知道能不能实现搂主的要求
------解决方案--------------------window.print()
------解决方案--------------------报表打印控件wsReport4.6
www.wave12.com
------解决方案--------------------window.print()
可以通过js调用。
------解决方案--------------------不过页面大小不能控制(或者很难),版式也不太容易控制。
------解决方案--------------------看看下面的代码
<%@ Page language= "c# " Codebehind= "printPass.aspx.cs " AutoEventWireup= "false " Inherits= "drPeng.HS.HotelManage.Account.printPass " %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN " >
<HTML>
<HEAD>
<title> 客户网络开通 </title>
<link href= "../css/manage.css " type= "text/css " rel= "stylesheet ">
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 ">
<Script language= "JavaScript ">
var hkey_root,hkey_path,hkey_key
hkey_root= "HKEY_CURRENT_USER "
hkey_path= "\\\\Software\\\\Microsoft\\\\Internet Explorer\\\\PageSetup\\\\ "
// 设置页眉页脚为空
function PageSetup_Null()
{
try{
var RegWsh = new ActiveXObject( "WScript.Shell ") ;
hkey_key= "header " ;
RegWsh.RegWrite(hkey_root+hkey_path+hkey_key, " ") ;
hkey_key= "footer " ;
RegWsh.RegWrite(hkey_root+hkey_path+hkey_key, " ") ;
}
catch(e){}
}
// 设置页眉页脚为默认值
function PageSetup_Default()
{
try{
var RegWsh = new ActiveXObject( "WScript.Shell ") ;
hkey_key= "header " ;
RegWsh.RegWrite(hkey_root+hkey_path+hkey_key, "&w&b页码,&p/&P ") ;
hkey_key= "footer " ;
RegWsh.RegWrite(hkey_root+hkey_path+hkey_key, "&u&b&d ") ;
}
catch(e){}
}
// 打印
function PrintPage()
{
PageSetup_Null();
document.getElementById( 'btnSub ').style.display = "none ";
document.getElementById( 'btnBack ').style.display = "none ";
document.getElementById( 'subLine ').style.display = "none ";
wb.execwb(6,1);
PageSetup_Default();
}
</Script>
<style type= "text/css "> .STYLE1 { FONT-SIZE: 12pt; COLOR: #0066ff } </style>
</HEAD>
<body>
<object classid= "CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 " height=0 id=WB name=wb width=0 VIEWASTEXT> </object>
<form id= "Form1 " method= "post " runat= "server ">
<table width= "380 " bgcolor= "gainsboro " cellSpacing= "0 " cellPadding= "0 " align= "center " border= "0 ">
<tr>