ASP 페이지 당 인쇄 줄 수 제어

<%pagenum=55'지정 인쇄 줄 수%>판매 이윤 내 역 보고서 인쇄</ITLE><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_keyhkey_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=kdname 1&"~"&kdname 2 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>                   <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 pagenumif 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"> <%=rs1("sellautoid")%></td>                   <td height="18" width="168"><%=Decode(rs1("productname"))%> <%=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.movenxtend ifnext%></table><%if not rs1.eof and i=pagenum+1 then'페이지 태그 추가%>  <div class="break"> </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">판매 번호</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>                   <td align="center"height="20"bgcolor="\#BDCBEE"width="25">결제</td>                   <td align="center"height="20"bgcolor="\#BDCBEE"width="61">판매 날짜</td>                 </tr> <%end iflooprs1.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="\#FF 0000"><b>현금 이윤:</b></font><b><%=formatNumber(moncount 2,varnum,-1)%></b>   <%if moncount 5<>"then%><b><font color="\#FF 0000">부채 이윤</font>:<%=formatNumber(moncount 5,varnum,-1)%></b><%end if%> nbsp; <%if moncount 5<>"then%><b><font color="\#FF 0000">총이익 합계:</font><%=formatNumber(moncount 5+moncount 2,varnum,-1)%></b><%end if%></td>                 </tr>      </table>            <%end ifconn.close set conn=nothing %>  </BODY></HTML>

좋은 웹페이지 즐겨찾기