• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号
您的位置:首页 > 程序设计 >ASP > ASP控制每页打印行数

ASP控制每页打印行数

作者: 字体:[增加 减小] 来源:互联网 时间:2017-05-11

通过本文主要向大家介绍了asp execute 得到行数,asp 控制ie打开大小,asp打印代码,asp打印控件,asp 打印等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
 

<%
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>            
      <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"> <%=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 heig

分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • ASP中Server.Execute和Execute实现动态包含(include)脚本的区别
  • ASP中使用Set ors=oConn.Execute()时获取记录数的方法
  • asp循环行数输出函数
  • Server.Execute方法执行指定的ASP程序
  • ASP控制每页打印行数
  • ASP中利用execute实现动态包含文件的方法

相关文章

  • 2017-05-11Access中使用Create Procedure创建存储过程第1/2页
  • 2017-05-11asp仿php的一些函数分享
  • 2017-05-11基于ASP实现QQ在线查询功能
  • 2017-05-11asp javascript picasa相册外链批量导出
  • 2017-05-11关于ASP生成伪参数技巧
  • 2017-05-11ASP 获取文件扩展名函数getFileExt()
  • 2017-05-11asp DateDiff实现文字在特定时间后消失
  • 2017-05-11asp遍历目录及子目录的函数
  • 2017-05-11写了段批量抓取某个列表页的东东
  • 2017-05-11随机提取N条记录 推荐

文章分类

  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号

最近更新的内容

    • 在不刷新页面的情况下调用远程asp脚本
    • aspupload文件重命名及上传进度条的解决方法附代码第1/2页
    • 从一个网站扒下的asp生成静态页面的代码 脚本之家特供版
    • 一段asp防注入的通用脚本
    • asp google pr查询代码
    • ASP小偷(远程数据获取)程序的入门教程
    • asp+JMAIL实现发送邮件
    • 推荐一篇不错的新手asp编程的基本法则第1/2页
    • asp下tag的实现,简单介绍与部分代码
    • ASP基础入门第三篇(ASP脚本基础)

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有