Page A는 일반적인 ASP 데이터 목록이지만 인쇄 할 때 인쇄 용지의 크기에 따라 페이지 당 인쇄선 수를 제어하려고합니다. 지금이 일을해야합니까? 이제 ASP를 사용하여 페이지 당 인쇄선 수를 제어하는 방법을 살펴 보겠습니다.
<%
pagenum = 55 '인쇄 라인의 수를 지정합니다
%>
<html>
<헤드>
<meta http-equiv = "content-type"content = "text/html; charset = gb2312">
<title> 인쇄 판매 이익 세부 정보 보고서 </title>
<스타일 유형 = "텍스트/CSS">
TD {font-size : 9pt; 색상 :#000000}
a {텍스트 결정 : 없음}
A : 호버 {color :#ff0000; 텍스트 설명 : derline}
.Break {page-break-before : 항상}
</스타일>
</head>
<script language = "javaScript">
Window.print ()
</스크립트>
<body style = "border : none" "topmargin ="0 "leftmargin ="6 "onload ="javasscript : pagesetup_default (); ">
<script language = "vbscript">
dim hkey_root, hkey_path, hkey_key_key
hkey_root = "hkey_current_user"
hkey_path = "/소프트웨어/Microsoft/Internet Explorer/PageSetup"
함수 pageetup_default ()
다음에 오류가 재개됩니다
set regwsh = createobject ( "wscript.shell")
hkey_key = "/헤더"
regwsh.regwrite hkey_root+hkey_path+hkey_key, "& bpage & p/& p"
hkey_key = "/바닥 글"
regwsh.regwrite hkey_root+hkey_path+hkey_key, ""
엔드 기능
</스크립트>
<%
kdname1 = trim (request ( "kdname1"))
kdname2 = trim (request ( "kdname2"))
keyword1 = trim (request ( "keyword1"))
keyword2 = trim (request ( "keyword2"))
Keyword1 <> ""라면
오늘 = 키워드 1
또 다른
kdname1 = ""인 경우
오늘 = 연도 (date ()) & "-"& month (date ())
또 다른
오늘 = kdname1 & "to"& kdname2
끝 If
끝 If
%>
<table cellPacing = "0"CellPadding = "0"align = "Center">
<tr>
<td align = "Center"> 영업 이익 요약 보고서 </td>
</tr>
</테이블>
<%
strsql = "select autoid, sellautoid, productxili, productName, productize, productnum, productdan, productjia, chaoshi, tiaoma, youhui, fukuan, moncount1, gongshang, lirun1, username, vudate, fudate, fudate, fudate, request.cookies ("my office (my office ( ")). 그리고 (Year (Indate) = Year (getDate ()) 및 Month (Indate) = Month (getDate ())) 및 Zhuofei는 autoid desc의 순서입니다. "
set rs1 = server.createobject ( "adodb.recordset")
Rs1. OPEN STRSQL, CONN, 1,1
%>
<table cellPacing = "0"CellPadding = "0"align = "Center"Style = "Border-Collapse : Collapse"BorderColor = "#000000">
<tr>
<td align = "center"bgcolor = "#bdcbee"> 판매 주문 번호 </td>
<td align = "center"bgcolor = "#bdcbee"> 제품 이름 (spec) </td>
<td align = "center"bgcolor = "#bdcbee"> customer </td>
<td align = "center"bgcolor = "#bdcbee"> 수량 </td>
<td align = "center"bgcolor = "#bdcbee"> unit </td>
<td align = "center"bgcolor = "#bdcbee"> 판매 가격 </td>
<td align = "center"bgcolor = "#bdcbee">%</td>
<td align = "center"bgcolor = "#bdcbee"> 구매 가격 </td>
<td align = "center"bgcolor = "#bdcbee"> subtotal </td>
<td align = "center"bgcolor = "#bdcbee"> 이익 </td>
<td align = "center"bgcolor = "#bdcbee"> 지불 </td>
<td align = "center"bgcolor = "#bdcbee"> 판매 날짜 </td>
</tr>
</테이블>
<%
moncount2 = 0
moncount5 = 0
Rs1.eof가 아닌 상태에서하십시오
%>
<table cellPadding = "0"CellPacing = "0"align = "Center"Style = "Border-Collapse : 붕괴; font-size : 10pt; color :#000000"BorderColor = "#000000">
<%
i = 1에서 pagenum
Rs1.eof가 아니라면
if trim (rs1 ( "fukuan")) = "chraers"라는 경우
moncount6 = csng (rs1 ( "lirun1")))
moncount5 = moncount5+moncount6
또 다른
moncount3 = csng (rs1 ( "lirun1"))
moncount2 = moncount2+moncount3
끝 If
%>
<tr>
<td> <%= rs1 ( "sellaautoid")%> </td>
<td> <%= decode (rs1 ( "productname"))%> <%= rs1 ( "productize")%> </td>
<td> <%= 왼쪽 (rs1 ( "gongshang"), 9)%> </td>
<td align = "center"> <%= rs1 ( "productNum")%> </td>
<td align = "center"> <%= rs1 ( "productDan")%> </td>
<td align = "right"> <%= formatnumber (rs1 ( "chaoshi"), varnum, -1)%> </td>
<td align = "center"> <%= rs1 ( "YouHui")%> </td>
<td align = "right"> <%= formatnumber (rs1 ( "productjia"), varnum, -1)%> </td>
<td align = "right"> <%= formatnumber (rs1 ( "moncount1"), varnum, -1)%> </td>
<td align = "right"> <%= FormatNumber (rs1 ( "liRun1"), varnum, -1)%> </td>
<td align = "center"> <%if trim (rs1 ( "fukuan")) = "jurears"그런 다음%> <font color = blue> <%= rs1 ( "fukuan")%> </font> <%else%> <%= rs1 ( "fukuan")%> <%end if%%> </td>
<td> <%= rs1 ( "Indate")%> </td>
</tr>
<%
rs1.movenext
끝 If
다음
%>
</테이블>
<%
rs1.eof와 i = pagenum+1이 아닌 경우 Pagination 마크를 추가하십시오
%>
<div> </div>
<table cellPadding = "0"CellPacing = "0"align = "center"> <tr> <td> </td> </tr> </table>
<table cellPacing = "0"CellPadding = "0"align = "Center"Style = "Border-Collapse : Collapse"BorderColor = "#000000">
<tr>
<td align = "center"bgcolor = "#bdcbee"> 판매 주문 번호 </td>
<td align = "center"bgcolor = "#bdcbee"> 제품 이름 (spec) </td>
<td align = "center"bgcolor = "#bdcbee"> customer </td>
<td align = "center"bgcolor = "#bdcbee"> 수량 </td>
<td align = "center"bgcolor = "#bdcbee"> unit </td>
<td align = "center"bgcolor = "#bdcbee"> 판매 가격 </td>
<td align = "center"bgcolor = "#bdcbee">%</td>
<td align = "center"bgcolor = "#bdcbee"> 구매 가격 </td>
<td align = "center"bgcolor = "#bdcbee"> subtotal </td>
<td align = "center"bgcolor = "#bdcbee"> 이익 </td>
<td align = "center"bgcolor = "#bdcbee"> 지불 </td>
<td align = "center"bgcolor = "#bdcbee"> 판매 날짜 </td>
</tr>
<%
끝 If
고리
rs1.close
RS1 = 아무것도 설정하지 않습니다
%>
</테이블>
<table cellPadding = "0"CellPacing = "0"align = "Center"Style = "Border-Collapse : Collapse"BorderColor = "#000000">
<tr>
<td> <font color = "#ff0000"> <b> 현금 이익 : </b> </font> <b> <%= FormatNumber (moncount2, varnum, -1)%> </b> <%if moncount5 <> "what%> <b> <font color ="#ff0000 "> 이익 배치 </font> : <%= FormatNumber (moncount5, varnum, -1)%> </b> <%종료 if%> <%if moncount5 <> ""그런 다음%> <b> <font <font> 이익 연기 </font> : <%= Formatnumber (moncount5, varnum, -1)%> </b> <%<%<%if <%font> " Color = "#ff0000"> 총 총 이익 : </font> <%= FormatNumber (moncount5+moncount2, varnum, -1)%> </b> <%if%> </td>
</tr>
</테이블>
<%
끝 If
conn.close
Conn = 아무것도 설정하지 않습니다
%>
</body>
</html>
위는이 기사의 전체 내용입니다. 이 기사의 내용이 모든 사람의 공부 나 일에 도움이되기를 바랍니다 ~