---testATGridPrint.aspx
<html>
<head>
<title>New Page 1 </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<body>
<p align="center">
<OBJECT id="ATGrid1" height="480" ;680" classid="clsid:D0CB6A0C-E656-4BF4-BD2D-6AE5EC183D7C">
<PARAM NAME="FileName" VALUE="CaiGouDingDan1.eT">
<PARAM NAME="BackColor" VALUE="#ffe7dd">
<PARAM NAME="Border3D" VALUE="FALSE">
<PARAM NAME="Ruler" VALUE="FALSE">
<PARAM NAME="DataSource" VALUE="importData3.aspx">
</OBJECT>
</p>
<p align="center">
<input type='button' value='打印预览' onclick='javascript:printPreviewRpt();'>
<input type='button' value='打印一份' onclick='javascript:printRpt();'>
<input type='button' value='连续打印' onclick='javascript:printRpt10();'>
</p>
<script language="JavaScript">
function PrintSetup()
{
var strXML;
strXML = " <?xml version='1.0' encoding='gb2312'?>";
strXML =" <EtCell>";
strXML =" <ETPrint>";
strXML =" <PaperSize value='DMPAPER_USER' depth='cm' '11' Height='8' />";
strXML =" <PrintFullPage value='true' /> ";
strXML =" </ETPrint>";
strXML =" </EtCell>";
//设置打印选项
ATGrid1.ImportXML(strXML);
}
function printPreviewRpt()
{
PrintSetup();
ATGrid1.PrintPreview();
}
function printRpt()
{
//下面导入数据
/*
ATGrid1.OpenDoc(xxx.et);
ATGrid1.ImportXML(url?参数);
ATGrid1.Print(false);
*/
PrintSetup();//设置纸张大小
ATGrid1.Print(false);
}
function printRpt10()
{
//循环打印10份
for(ii=0;ii <10;ii )
{
printRpt();
}
}
</SCRIPT>
</body>
</html>
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。