?? show_report_sell011.asp
字號:
<!--#include file="../conn.asp"-->
<!--#include file="function.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>
<table width="100%" border="0" align="center" cellpadding="5" 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 width="30%"><strong>相關(guān)客戶</strong></td>
<td width="30%"><strong>主題</strong></td>
<td width="20%"><strong>訂單/合同號</strong></td>
<td width="20%"><strong>銷售日期</strong></td>
</tr>
<tr>
<td colspan="4" align="center" height="2">
<hr align="left" size="2" color="#000000" width="99%" >
</td>
</tr>
<%
if request("page")<>"" then
page=cint(request("page"))
else
page=1
end if
if request("state")<>"" then
Row_statue=request("last")
else
Row_statue=0
end if
set rs = server.createobject("adodb.recordset")
sql="select * from sell order by sellclientid"
rs.open sql,conn,3
if not rs.eof then
rs.pagesize=20
rs.AbsolutePage=page
pcount = rs.pagecount
for i=1 to rs.pagesize
if rs.eof then exit for
%>
<%
if rs("sellclientid")<>temp then
%>
<!-- 顯示客戶-->
<tr bgcolor="#E8E8E8">
<td width="30%"><strong><%=showclientname(rs("sellclientid"))%></strong></td>
<td width="30%"><%=rs("selltopic")%></td>
<td width="20%"><%=rs("sellordernum")%></td>
<td width="20%"><%=rs("selldate")%></td>
</tr>
<!-- 顯示客戶購買的產(chǎn)品-->
<tr >
<td align="center" colspan="4">
<table width="80%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="30%"><em>產(chǎn)品名稱</em></td>
<td width="20%"><div align="right"><em>單價</em></div></td>
<td width="25%"><div align="right"><em>數(shù)量</em></div></td>
<td><div align="right"><em>金額</em></div></td>
</tr>
<tr>
<td colspan="4" ><img src="../images/hr.gif" width="100%"height="1"></td>
</tr>
<%
total_p=total_p+formatnumber(rs("sellmoney"),2-1)
%>
<tr >
<td align="center" colspan="4">
<table width="80%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25"><%=rs("SellProduct")%></td>
<td><div align="right"><%=rs("SellProductprice")%></div></td>
<td><div align="right"><%=rs("SellProductnum")%></div></td>
<td><div align="right"><%=rs("Sellmoney")%></div></td>
</tr>
<%else%>
<%
total_p=total_p+formatnumber(rs("sellmoney"),2-1)
%>
<tr >
<td align="center" colspan="4">
<table width="80%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25"><%=rs("SellProduct")%></td>
<td><div align="right"><%=rs("SellProductprice")%></div></td>
<td><div align="right"><%=rs("SellProductnum")%></div></td>
<td><div align="right"><%=rs("Sellmoney")%></div></td>
</tr>
<%end if%>
<%
rs.movenext
temp1=rs("sellclientid")
response.Write(temp1)
response.Write(temp)
if temp1<>temp or rs.eof then
temp=rs("sellclientid")
total_p=0
%>
<tr>
<td colspan="4" align="left" ><img src="../images/hr.gif" width="100%" height="1"></td>
</tr>
<tr>
<td height="25" colspan="2"></td>
<td><div align="right"><strong>小計</strong></div></td>
<td><div align="right"><strong><%=total_p%></strong></div></td>
</tr>
<%end if%>
</table>
</td>
</tr>
<%
next
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 + -