chart_sell_list.asp
来自「Activity——活动管理模块 Analyse——分析模块 Client—」· ASP 代码 · 共 59 行
ASP
59 行
<!--#include file="../conn.asp"-->
<!--#include file="../IsUser.asp"-->
<!--#include file="Private_fun.asp"-->
<!--#include file="../pub_fun.asp"-->
<script language="vBScript">
opener.close()
</script>
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<style>
v\:* { behavior: url(#default#VML) }
o\:* { behavior: url(#default#VML) }
.shape { behavior: url(#default#VML) }
</style>
<HEAD><title>销售分析</title>
<META NAME="Keywords" CONTENT="FastReport"/>
<META NAME="Description" CONTENT="The FastReport report"/>
<LINK href="../css.css" rel="stylesheet" type="text/css" media="all">
</head>
<body >
<%
dim show_data(100,2)
condition= decrypt(trim(request("condition")))
sql="select "
select case trim(request("kind"))
case "0"
sql=sql&"YEAR(SellDate) AS selldate, SUM(Sellmoney) AS totalmoney, SUM(SellProductnum) AS totalnum FROM Sell"
sql=sql& condition
sql=sql&" GROUP BY YEAR(SellDate)"
case "1"
sql=sql&" RTRIM(YEAR(SellDate)) + '-' + RTRIM(MONTH(SellDate)) AS selldate, SUM(Sellmoney) AS totalmoney, SUM(SellProductnum) AS totalnum, CONVERT(datetime, RTRIM(YEAR(SellDate)) + '-' + RTRIM(MONTH(SellDate)) + '-1') AS selloder from sell"
sql=sql& condition
sql=sql&" GROUP BY RTRIM(YEAR(SellDate)) + '-' + RTRIM(MONTH(SellDate)), CONVERT(datetime, RTRIM(YEAR(SellDate)) + '-' + RTRIM(MONTH(SellDate)) + '-1') ORDER BY selloder"
case "2"
sql=sql&" SellDate, SUM(Sellmoney) AS totalmoney, SUM(SellProductnum) AS totalnum FROM Sell"
sql=sql& condition
sql=sql&" GROUP BY SellDate"
end select
set rs_s = server.createobject("adodb.recordset")
rs_s.open sql,conn,3
if not rs_s.eof then
total_no=rs_s.recordcount
for i=1 to total_no
show_data(i,1)=cdbl(rs_s("totalmoney"))
show_data(i,2)=rs_s("selldate")
rs_s.movenext
next
end if
width=cint(total_no)*65
call table1(show_data,total_no,-20,40,8,15,width,400)
%>
</BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?