佳木斯湛栽影视文化发展公司

主頁(yè) > 知識(shí)庫(kù) > ASP控制每頁(yè)打印行數(shù)

ASP控制每頁(yè)打印行數(shù)

熱門標(biāo)簽:電子圍欄 服務(wù)器配置 Mysql連接數(shù)設(shè)置 阿里云 團(tuán)購(gòu)網(wǎng)站 銀行業(yè)務(wù) 科大訊飛語(yǔ)音識(shí)別系統(tǒng) Linux服務(wù)器
 

%
pagenum=55'指定打印行數(shù)
%>
HTML>
HEAD>
meta http-equiv="Content-Type" content="text/html; charset=gb2312">
TITLE>銷售利潤(rùn)明細(xì)報(bào)表打印/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頁(yè)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">銷售利潤(rùn)匯總報(bào)表/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" >銷售單號(hào)/td>            
      td align="center" height="20" bgcolor="#BDCBEE" width="168" >商品名稱(規(guī)格)/td>            
      td align="center" height="20" bgcolor="#BDCBEE" width="121" >客戶/td>            
      td align="center" height="20" bgcolor="#BDCBEE" width="30" >數(shù)量/td>            
      td align="center" height="20" bgcolor="#BDCBEE" width="24" >單位/td>            
      td align="center" height="20" bgcolor="#BDCBEE" width="50" >銷售價(jià)/td>            
      td align="center" height="20" bgcolor="#BDCBEE" width="23" >折%/td>            
      td align="center" height="20" bgcolor="#BDCBEE" width="52" >進(jìn)貨價(jià)/td>            
      td align="center" height="20" bgcolor="#BDCBEE" width="55" >小計(jì)/td>            
      td align="center" height="20" bgcolor="#BDCBEE" width="45" >利潤(rùn)/td>            
      td align="center" height="20" bgcolor="#BDCBEE" width="25" >付款/td>            
      td align="center" height="20" bgcolor="#BDCBEE" width="61" >銷售日期/td>            
    /tr>
  /table>
%            
  moncount2=0            
  moncount5=0            
  Do while not rs1.eof 
%>
table border="1" cellpadding="0" cellspacing="0" width="740" align="center" style="border-collapse:collapse; font-size:10pt;color:#000000" bordercolor="#000000">
%
for i=1 to pagenum
if not rs1.eof then
  if trim(rs1("fukuan"))="欠款" then            
  moncount6=Csng(rs1("lirun1"))            
  moncount5=moncount5+moncount6            
  else            
  moncount3=Csng(rs1("lirun1"))            
  moncount2=moncount2+moncount3            
  end if 
%>     
    tr>            
      td height="18" width="70">nbsp;%=rs1("sellautoid")%>/td>            
      td height="18" width="168">%=Decode(rs1("productname"))%>nbsp;%=rs1("productsize")%>/td>            
      td height="18" width="121">%=left(rs1("gongshang"),9)%>/td>           
      td height="18" width="30" align="center">%=rs1("productnum")%>/td>           
      td height="18" width="24" align="center">%=rs1("productdan")%>/td>           
      td height="18" width="50" align="right">%=formatNumber(rs1("chaoshi"),varnum,-1)%>/td>           
      td height="18" width="23" align="center">%=rs1("youhui")%>/td>           
      td height="18" width="52" align="right">%=formatNumber(rs1("productjia"),varnum,-1)%>/td>           
      td height="18" width="55" align="right">%=formatNumber(rs1("moncount1"),varnum,-1)%>/td>           
      td height="18" width="45" align="right">%=formatNumber(rs1("lirun1"),varnum,-1)%>/td>           
      td align="center" height="18" width="25">%if trim(rs1("fukuan"))="欠款" then%>font color=blue>%=rs1("fukuan")%>/font>%else%>%=rs1("fukuan")%>%end if%>/td>           
      td height="18" width="61">%=rs1("indate")%>/td>           
    /tr>
%
rs1.movenext
end if
next
%>
/table>
%
if not rs1.eof and i=pagenum+1 then '添加分頁(yè)標(biāo)記
%>
  div class="break">nbsp;/div>
  table border="0" cellpadding="0" cellspacing="0" width="740" height="12" align="center">tr>td height="12">/td>/tr>/table>
  table border="1" cellspacing="0" cellpadding="0" align="center" width="740" style="border-collapse: collapse"  bordercolor="#000000">
    tr>            
      td align="center" height="20" bgcolor="#BDCBEE" width="70" >銷售單號(hào)/td>            
      td align="center" height="20" bgcolor="#BDCBEE" width="168" >商品名稱(規(guī)格)/td>            
      td align="center" height="20" bgcolor="#BDCBEE" width="121" >客戶/td>            
      td align="center" height="20" bgcolor="#BDCBEE" width="30" >數(shù)量/td>            
      td align="center" height="20" bgcolor="#BDCBEE" width="24" >單位/td>            
      td align="center" height="20" bgcolor="#BDCBEE" width="50" >銷售價(jià)/td>            
      td align="center" height="20" bgcolor="#BDCBEE" width="23" >折%/td>            
      td align="center" height="20" bgcolor="#BDCBEE" width="52" >進(jìn)貨價(jià)/td>            
      td align="center" height="20" bgcolor="#BDCBEE" width="55" >小計(jì)/td>            
      td align="center" height="20" bgcolor="#BDCBEE" width="45" >利潤(rùn)/td>            
      td align="center" height="20" bgcolor="#BDCBEE" width="25" >付款/td>            
      td align="center" height="20" bgcolor="#BDCBEE" width="61" >銷售日期/td>            
    /tr>
%
end if
loop
rs1.close    
set rs1=nothing    
%> 
/table> 
  table border="1" cellpadding="0" cellspacing="0" width="740" height="20" align="center" style="border-collapse: collapse"  bordercolor="#000000">
    tr>           
       td>font color="#FF0000">b>現(xiàn)金利潤(rùn):/b>/font>b>%=formatNumber(moncount2,varnum,-1)%>/b>nbsp;nbsp;nbsp;%if moncount5>"" then%>b>font color="#FF0000">欠款利潤(rùn)/font>:%=formatNumber(moncount5,varnum,-1)%>/b>%end if%>nbsp;nbsp;nbsp;%if moncount5>"" then%>b>font color="#FF0000">毛利合計(jì):/font>%=formatNumber(moncount5+moncount2,varnum,-1)%>/b>%end if%>/td>           
     /tr>  
   /table>           
%
end if
conn.close
set conn=nothing
%> 

/BODY>
/HTML>


您可能感興趣的文章:
  • Windows 2003 IIS 6.0 搭建可建虛擬機(jī)的asp+.net+php+jsp+mysql+mssql
  • asp循環(huán)行數(shù)輸出函數(shù)
  • asp php 清空access mysql mssql數(shù)據(jù)庫(kù)的代碼
  • ASP+MSSQL2000 數(shù)據(jù)庫(kù)被批量注入后的解決方法
  • asp連接mssql2005的代碼
  • asp刪除mssql數(shù)據(jù)庫(kù)中沒(méi)有記錄的圖片代碼
  • asp實(shí)現(xiàn)的查詢某關(guān)鍵詞在MSSQL數(shù)據(jù)庫(kù)位置的代碼
  • asp實(shí)現(xiàn)獲取MSSQL數(shù)據(jù)庫(kù)表指定條件行數(shù)的函數(shù)

標(biāo)簽:江蘇 棗莊 衡水 廣元 蚌埠 大理 萍鄉(xiāng) 衢州

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《ASP控制每頁(yè)打印行數(shù)》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266
    资阳市| 英山县| 汽车| 稷山县| 海阳市| 蓬莱市| 南通市| 清河县| 柯坪县| 天等县| 成都市| 淮滨县| 且末县| 文登市| 河西区| 澄江县| 旬邑县| 城市| 新密市| 额济纳旗| 镇赉县| 玉山县| 枝江市| 竹山县| 绿春县| 琼海市| 汕头市| 柘荣县| 邵东县| 始兴县| 九江市| 拜泉县| 台东县| 噶尔县| 武穴市| 安平县| 马龙县| 大化| 乌拉特前旗| 屏东市| 苏尼特左旗|