chart_sell_gc.asp
来自「Activity——活动管理模块 Analyse——分析模块 Client—」· ASP 代码 · 共 70 行
ASP
70 行
<!--#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 >
<%
''获取统计对象
kind=trim(request("kind"))
''解密查询条件
condition= decrypt(trim(request("condition")))
sql="select "
''根据查询对象生成SQL查询语句
select case trim(request("kind"))
case "0"
sql=sql&" Sellclientid, SUM(Sellmoney) AS totalmoney, SUM(SellProductnum) AS totalnum FROM Sell"
sql=sql& condition
sql=sql&" GROUP BY SellClientid"
case "1"
sql=sql&" SellProduct, SUM(Sellmoney) AS totalmoney, SUM(SellProductnum) AS totalnum FROM Sell"
sql=sql& condition
sql=sql&" GROUP BY SellProduct"
end select
'定义一个二维数组
dim show_data(100,2)
''建立数据集
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"))
'根据统计对象分别将要先是的标题设置为客户或者产品
if kind="0" then
show_data(i,2)=showclientname(rs_s("SellClientid"))
else
show_data(i,2)=trim (rs_s("SellProduct"))
end if
rs_s.movenext
next
end if
width=cint(total_no)*90
call table1(show_data,total_no,-20,40,8,15,width,400)
%>
</BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?