ASP控制每页打印行数

 

<%
pagenum=55'指定打印行数
%>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<TITLE>销售利润明细报表打印</TITLE>
<style type="text/css">
td {font-size:9pt; color:#000000}
A{text-decoration:none}
A:hover{color:#FF0000;text-decoration:derline}
.break{page-break-before:always}
</style>
</HEAD>
<script language="javascript">
window.print()
</script>
<BODY style="border:none" topmargin="0" leftmargin="6" onload="javascrpt:pagesetup_default();">
<script language="VbScript">
dim hkey_root,hkey_path,hkey_key
hkey_root="HKEY_CURRENT_USER"
hkey_path="\Software\Microsoft\Internet Explorer\PageSetup"
function pagesetup_default()
    on error resume next
    Set RegWsh = CreateObject("WScript.Shell")
    hkey_key="\header"   
    RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"&b页&p/&P"
    hkey_key="\footer"
    RegWsh.RegWrite hkey_root+hkey_path+hkey_key,""
end function
</script>

<%
kdname1=trim(request("kdname1"))
kdname2=trim(request("kdname2"))
keyword1=trim(request("keyword1"))
keyword2=trim(request("keyword2"))

 if keyword1<>"" then
 today=keyword1
 else
 if kdname1="" then
 today=year(date())&"-"&month(date())
 else
 today=kdname1&"至"&kdname2
 end if
 end if
%>
  <table border="0" cellspacing="0" cellpadding="0" align="center" width="740"  height="30">
    <tr>
      <td align="center">销售利润汇总报表</td>
    </tr>
  </table>

<% 
 strSQL="select autoid,sellautoid,productxili,productname,productsize,productnum,productdan,productjia,chaoshi,tiaoma,youhui,fukuan,moncount1,gongshang,lirun1,username,indate,fudate from sell where officename='"&trim(request.cookies("Myoffice"))&"' and monthjie='0' and (year(indate)=year(getdate()) and month(indate)=month(getdate())) and zhuofei is null order by autoid desc"            
 set rs1=server.createobject("adodb.recordset")             
 rs1.open strSQL,conn,1,1
%>              
  <table border="1" cellspacing="0" cellpadding="0" align="center" style="border-collapse: collapse"  bordercolor="#000000" width="740">            
    <tr>            
      <td align="center" height="20" bgcolor="#BDCBEE" width="70" >销售单号</td>            

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/2882.html