⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 show_report_sellbyoperator01.asp

📁 Activity——活动管理模块 Analyse——分析模块 Client——客户管理系统模块 Email——E-mail管理模块 Fee——费用管理模块 Report——报表模块 Sel
💻 ASP
字号:
<!--#include file="../conn.asp"-->
<!--#include file="../pub_fun.asp"-->
<META NAME="Keywords" CONTENT="FastReport"/>
<META NAME="Description" CONTENT="The FastReport report"/>
<LINK href="../css.css" rel="stylesheet" type="text/css" media="all">
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<body>


<form name="form1">
</form>

<%
''获取传递过来的查询条件
textsql=decrypt(request("textsql"))

''获取要线使得页面数
  if request("movepage")<>"" then 
      page=cint(request("movepage"))
  else
      page=1
  end if

''生成相应的查询语句
   sql="select * from sell  where 1=1 "&textsql
   sql=sql&" order by sellcreatorid,selldate"
%>
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr> 
    <td colspan="4" height="25" valign="top"><div align="left"><strong><font color="#3399FF" size="3">销售统计报表(按操作者)</font></strong></div></td>
  </tr>
  <tr> 
    <td colspan="4" align="center" height="2">
	<hr align="left" size="2" color="#000000" width="99%" >
	</td>
  </tr>

<%

   
  	set rs = server.createobject("adodb.recordset")   
	rs.open sql,conn,3
   if not rs.eof then   
  rs.pagesize=22
  rs.AbsolutePage=page
  pcount = rs.pagecount

'获取上一页的最后一个记录的sellcreatorid
rs.moveprevious
if not rs.bof then
last_id=(rs("sellcreatorid"))
end if
rs.movenext

   for i=1 to rs.pagesize
       if rs.eof then exit for 

       if rs("sellcreatorid")<>last_id  then 
  %>  
  <!--  显示客户-->
  <tr bgcolor="#E8E8E8"> 
    <td width="30%" height="25" valign="bottom" align="center" colspan="4"><strong><%=showoperatorname(rs("sellcreatorid"))%></strong></td>
  </tr>
    <!--  显示客户购买的产品-->
    <tr > 
    <td  align="center" colspan="4">
	 <table width="80%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td  colspan="5" height="5"></td>
        </tr>
        <tr> 
          <td width="20%"><strong>销售日期</strong></td>
          <td width="30%"><strong>产品名称</strong></td>
          <td width="15%"><div align="right"><strong>单价</strong></div></td>
          <td width="15%"><div align="right"><strong>数量</strong></div></td>
          <td><div align="right"><strong>金额</strong></div></td>
        </tr>
        <tr> 
          <td  colspan="5" ><img src="../images/hr.gif" width="100%"height="1"></td>
        </tr>
        <tr> 
          <td height="25"  width="20%"><%=rs("selldate")%></td>
          <td height="25"  width="30%"><%=rs("SellProduct")%></td>
          <td width="15%"><div align="right"><%=rs("SellProductprice")%></div></td>
          <td width="15%"><div align="right"><%=rs("SellProductnum")%></div></td>
          <td><div align="right"><%=rs("Sellmoney")%></div></td>
        </tr>
      </table>
	</td>
	</tr>
	<%else%>
	<tr>
	 <td  align="center" colspan="4">
	 <table width="80%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
		 <td height="25"  width="20%"><%=rs("selldate")%></td>
          <td height="25"  width="30%"><%=rs("SellProduct")%></td>
          <td width="15%"><div align="right"><%=rs("SellProductprice")%></div></td>
          <td width="15%"><div align="right"><%=rs("SellProductnum")%></div></td>
          <td><div align="right"><%=rs("Sellmoney")%></div></td>
        </tr>
      </table>
	</td>
  </tr>
  <%end if%>
  <% 

   if rs.eof then exit for
  last_id=rs("sellcreatorid")
   rs.movenext
   if rs.eof then
         lastflag=1
   else
  		 if rs("sellcreatorid")<>last_id  then
  		 lastflag=1
		 else 
		 lastflag=0
  		 end if		 
   end if
       if  (lastflag=1) then 
%>
	<tr>
	 <td  align="center" colspan="4">
	 <table width="80%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="50%" colspan="2"></td><td  colspan="3" align="left" ><img src="../images/hr.gif" width="100%" height="1"></td>
        </tr>
        <tr> 
          <td height="25" colspan="3"  width="65%"></td>
          <td  width="15%"><div align="right"><strong>小计:</strong></div></td>
          <td><div align="right"><strong><%= showsellsum_o(last_id)%></strong></div></td>
        </tr>
      </table>
	</td>
  </tr>
<%

   end if
 next
 
 '补足后面的空格
 if i<rs.pagesize then
    for j=i to rs.pagesize-1
	response.Write("<tr><td height=40></td></tr>")
	next
end if

else
	response.Write("<tr><td height=30>没有纪录!</td></tr>")
end if

%>


  <tr> 
    <td colspan="4"  height="5"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td colspan="2">
		  <hr align="left" size="2" color="#000000" width="99%" >
		  </td>
        </tr>
        <tr> 
          <td width="95%"><div align="left"><%=date()%></div></td>
          <td><div align="left"><%=page%>/<%=pcount%></div></td>
        </tr>
      </table></td>
  </tr>
</table>
</BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -