注册 登录
编程论坛 ASP技术论坛

向asp高手求助:如何将数据库中需要统计的字段用图形的方式显示到客户端?

kangli_kl 发布于 2010-07-02 11:11, 1269 次点击
如题:现在想将数据库中的字段按一定条件统计出来然后用折线图或柱状图显示,请各位大侠帮帮忙?小弟先谢谢了!!
7 回复
#2
魏兴耀2010-07-02 12:49
可以在数据库中做好报表,然后调用
#3
kangli_kl2010-07-02 13:52
大侠们最好说详细些或者给个教程的连接,小弟是新手,先谢谢了
#4
hams2010-07-02 15:49
将数据库中的字段按一定条件统计出来——这是第一步

然后用折线图或柱状图显示——这是第二步

第一步网上教程大把
第二步参考这里:https://bbs.bccn.net/thread-311381-1-1.html
#5
kangli_kl2010-07-12 14:40
谢谢楼上hams版主,第二步的参考貌似不是很详细,有详细点的教程么?
#6
yms1232010-07-12 22:00
百度搜索折线图组件,或水晶报表、VMS
#7
jingjing3162010-07-13 08:41
< !-- #include file="adoconn.asp" -->
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<title>曲线统计</title>
<STYLE>
v\:* { Behavior: url(#default#VML) }
o\:* { behavior: url(#default#VML) }
</STYLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
var showit = new Array(10);
function moveon(iteam,lineit){
temp=eval(iteam)
templine=eval(lineit)
if(showit[1]){
rec1.style.display = "";
line_1.style.display = "";
}else{
rec1.style.display = "none";
line_1.style.display = "none";
}
temp.style.display = "";
templine.style.display = "";
}
function moveout(iteam,lineit,i){
temp=eval(iteam)
templine=eval(lineit)
if (showit[i]){
temp.style.display = "";
templine.style.display = "";
}else{
temp.style.display = "none";
templine.style.display = "none";
}
}
function clickit(i){
if (showit[i]){
showit[i]=false
}else{
showit[i]=true
}
}
-->
</script>
</head>
<body>
< %
'''''''''''''''''''''''''''''''''''''''''''''
' 功能:asp读取数据库中数据生成统计折线图
' 开发:wangsdong
' 地址:www.
' 支持原创,保留此信息,谢谢
'''''''''''''''''''''''''''''''''''''''''''''
date1=cdate("2008-01-01 00:00:00")
date2=cdate("2008-12-31 23:59:59")
sql="select sum(m_value) as t,m_month from table1 where m_time>=#"&date1&"# and m_time<=#"&date2&"# group by m_month"
rs.open sql,conn,1,1
if rs.eof then
else
  redim total(1,2)
  s=""
  v1=""
  do while not rs.eof   
  s=s&","&rs("m_month")&"月"
  v1=v1&","&rs("t")
  rs.movenext
  loop  
  total(0,1)=right(s,len(s)-1)
  total(1,1)=right(v1,len(v1)-1)
  total(1,2)="2008年业绩图"
end if
rs.close
set rs=nothing
call table1(total,20,20,700,350,"曲线统计图","时间","元")
% >
</body>
</html>

从网上找的,上面不要动,就把下面数据库中的数据转为自己的,不过我没有试验过
#8
kangli_kl2010-08-13 14:22
谢谢楼上,改天试试
1