ASP controls the number of lines printed per page

Source: Internet
Author: User
Tags date getdate trim
Print | control <%
Pagenum=55 ' Specifies the number of lines to print
%>
<HTML>
<HEAD>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<TITLE> Sales Profit Detail report print </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 page &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& "to" &kdname2
End If
End If
%>
<table border= "0" cellspacing= "0" cellpadding= "0" align= "center" width= "740" height= ">"
<tr>
&LT;TD align= "Center" > Sales Profit Summary report </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 (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>
&LT;TD align= "center" height= "bgcolor=" #BDCBEE "width=" > Sales number </td>
&LT;TD align= "center" height= "bgcolor=" #BDCBEE "width=" > Product name (SPEC) </td>
&LT;TD align= "center" height= "bgcolor=" #BDCBEE "width=" 121 "> Customer </td>
&LT;TD align= "center" height= "bgcolor=" #BDCBEE "width=" > Quantity </td>
&LT;TD align= "center" height= "bgcolor=" #BDCBEE "width=" > Unit </td>
&LT;TD align= "center" height= "bgcolor=" #BDCBEE "width=" > Sales price </td>
&LT;TD align= "center" height= "bgcolor=" #BDCBEE "width=" > Fold%</td>
&LT;TD align= "center" height= "bgcolor=" #BDCBEE "width=" "> Purchase price </td>
&LT;TD align= "center" height= "bgcolor=" #BDCBEE "width=" > Subtotal </td>
&LT;TD align= "center" height= "bgcolor=" #BDCBEE "width=" > Profit </td>
&LT;TD align= "center" height= "bgcolor=" #BDCBEE "width=" > Payment </td>
&LT;TD align= "center" height= "bgcolor=" #BDCBEE "width=" > Sales Date </td>
</tr>
</table>
<%
Moncount2=0
Moncount5=0



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.