ASP控制每页打印行数[1]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 liujun999999 的 blog

<%
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>            
      <td align="center" height="20" bgcolor="#bdcbee" width="168" >商品名称(规格)</td>            
      <td align="center" height="20" bgcolor="#bdcbee" width="121" >客户</td>            
      <td align="center" height="20" bgcolor="#bdcbee" width="30" >数量</td>            
      <td align="center" height="20" bgcolor="#bdcbee" width="24" >单位</td>            
      <td align="center" height="20" bgcolor="#bdcbee" width="50" >销售价</td>            
      <td align="center" height="20" bgcolor="#bdcbee" width="23" >折%</td>            
      <td align="center" height="20" bgcolor="#bdcbee" width="52" >进货价</td>            
      <td align="center" height="20" bgcolor="#bdcbee" width="55" >小计</td>            
      <td align="center" height="20" bgcolor="#bdcbee" width="45" >利润</td>            

本文关键:ASP控制每页打印行数
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top