<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<%
year1=request("nd")
month1=request("yd")
week1=request("zhou")
if len(month1)=1 then
month1="0" &
month1
end if
dim tj
tj="where nian='" &
year1 &
"' and yue='" &
month1 &
"' and zhou='" &
week1 &
"'"
set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open "dfdl","sa","gjfd"
SQL="SELECT * FROM zhou_fdl " &
tj
Set RS=Conn.Execute(SQL)
if rs.eof then
response.write "无本周的报表!"
else
Set CurChart= server.CreateObject("TeeChart.TChart")
set fso=server.createobject("scripting.filesystemobject")
CurChart.RemoveAllSeries
CurChart.Width = 700
CurChart.Height = 300
CurChart.Header.Text.Clear
CurChart.Header.Text.Add("周发电量图表")
CurChart.Header.Font.Color=RGB(255,0,0)
CurChart.Header.Font.Size=10
'CurChart.Footer.Text.Clear
'CurChart.Footer.Text.Add("发电厂")
'CurChart.Footer.Font.Color=RGB(255,255,255)
'CurChart.Footer.Font.Size=10
' 设置横坐标刻度
CurChart.Axis.Bottom.Labels.Font.Color=RGB(255,255,255)
CurChart.Axis.Bottom.Labels.Font.Bold=True
CurChart.Axis.Bottom.Labels.Font.Size=11
' 设置纵坐标标题
CurChart.Axis.Left.Title.Caption="亿度"
CurChart.Axis.Left.Title.Font.Color=RGB(255,255,0)
CurChart.Axis.Left.Title.Font.Size=15
' 设置纵坐标刻度
CurChart.Axis.Left.Labels.Font.Color=RGB(255,255,0)
CurChart.Axis.Left.Labels.Font.Bold=True
CurChart.Axis.Left.Labels.Font.Size=10
' 指定各系列的提示位置
CurChart.Legend.
Alignment=1
' 设置图形背景
CurChart.Panel.Gradient.Visible=True
CurChart.Panel.Gradient.StartColor=&HEE2922
CurChart.Panel.Gradient.EndColor=&HFFFF99
' 设置三维效果
CurChart.Walls.Left.Size=6
CurChart.Walls.Bottom.Size=6
CurChart.Aspect.Chart3DPercent=30
CurChart.Aspect.View3D =true
ChartType =1 '1 is 输出柱状图
curchart.legend.
Visible=true
CurChart.AddSeries(ChartType)
CurChart.Series(0).title="月计划"
CurChart.Series(0).Add rs("yg_yjh"),"阳光",&HFFFFFF
CurChart.Series(0).Add rs("hd_yjh"),"河电",&HFFFFFF
CurChart.Series(0).Add rs("ld_yjh"),"柳电",&HFFFFFF
CurChart.Series(0).Add rs("dr_yjh"),"大热",&HFFFFFF
CurChart.Series(0).Add rs("tq_yjh"),"天桥",&HFFFFFF
CurChart.Series(0).Add rs("ts_yjh"),"天石",&HFFFFFF
CurChart.Series(0).Marks.Style=smsValue
CurChart.Series(0).Marks.Visible=False
CurChart.Series(0).ColorEachPoint = False
CurChart.AddSeries(ChartType)
CurChart.Series(1).title="周计划"
CurChart.Series(1).Add rs("yg_zjh"),"阳光", clTeeColor
CurChart.Series(1).Add rs("hd_zjh"),"河电", clTeeColor
CurChart.Series(1).Add rs("ld_zjh"),"柳电", clTeeColor
CurChart.Series(1).Add rs("dr_zjh"),"大热", clTeeColor
CurChart.Series(1).Add rs("tq_zjh"),"天桥", clTeeColor
CurChart.Series(1).Add rs("ts_zjh"),"天石", clTeeColor
CurChart.Series(1).Marks.Style=smsValue
CurChart.Series(1).Marks.Visible=False
CurChart.Series(1).ColorEachPoint = False
CurChart.AddSeries(ChartType)
CurChart.Series(2).title="周实际"
CurChart.Series(2).Add rs("yg_zsj"),"阳光", clTeeColor
CurChart.Series(2).Add rs("hd_zsj"),"河电", clTeeColor
CurChart.Series(2).Add rs("ld_zsj"),"柳电", clTeeColor
CurChart.Series(2).Add rs("dr_zsj"),"大热", clTeeColor
CurChart.Series(2).Add rs("tq_zsj"),"天桥", clTeeColor
CurChart.Series(2).Add rs("ts_zsj"),"天石", clTeeColor
CurChart.Series(2).Marks.Style=smsValue
CurChart.Series(2).Marks.Visible=False
CurChart.Series(2).ColorEachPoint = False
CurChart.AddSeries(ChartType)
CurChart.Series(3).title="差别"
CurChart.Series(3).Add rs("yg_cb"),"阳光", clTeeColor
CurChart.Series(3).Add rs("hd_cb"),"河电", clTeeColor
CurChart.Series(3).Add rs("ld_cb"),"柳电", clTeeColor
CurChart.Series(3).Add rs("dr_cb"),"大热", clTeeColor
CurChart.Series(3).Add rs("tq_cb"),"天桥", clTeeColor
CurChart.Series(3).Add rs("ts_cb"),"天石", clTeeColor
CurChart.Series(3).Marks.Style=smsValue
CurChart.Series(3).Marks.Visible=False
CurChart.Series(3).ColorEachPoint = False
' 把图形文件名转化成本地绝对路径表达方式
JpegLocalFile = Server.Mappath( "char_zfd.jpg" )
CurChart.Export.SaveToJPEGFile JpegLocalFile, False, jpegBestQuality, 92,CurChart.Width, CurChart.Height
Set CurChart = Nothing
%>
<div align="center">
<center>
<table border="0" width="100%">
<tr>
<td width="100%" colspan="2"> <p align="center">
<% Response.Write("<img src=char_zfd.jpg align='center'>") %>
</td>
</tr>
<tr>
<td width="90">&nbsp;</td>
<td>
<table width="600" border="1" align="left" cellpadding="0" cellspacing="0">
<tr>
<td>&nbsp;</td>
<td width="13%">阳光</td>
<td width="13%">河坡</td>
<td width="13%">柳电</td>
<td width="13%">大热</td>
<td width="13%">天桥</td>
<td width="13%">天石</td>
</tr>
<tr>
<%response.Write("<td>月计划</td>")
response.Write("<td width='13%'>" &
rs("yg_yjh") &
"</td>")
response.Write("<td width='13%'>" &
rs("hd_yjh") &
"</td>")
response.Write("<td width='13%'>" &
rs("ld_yjh") &
"</td>")
response.Write("<td width='13%'>" &
rs("dr_yjh") &
"</td>")
response.Write("<td width='13%'>" &
rs("tq_yjh") &
"</td>")
response.Write("<td width='13%'>" &
rs("ts_yjh") &
"</td>")
response.Write("</tr>")
response.Write("<tr>")
response.Write("<td>周计划</td>")
response.Write("<td width='13%'>" &
rs("yg_zjh") &
"</td>")
response.Write("<td width='13%'>" &
rs("hd_zjh") &
"</td>")
response.Write("<td width='13%'>" &
rs("ld_zjh") &
"</td>")
response.Write("<td width='13%'>" &
rs("dr_zjh") &
"</td>")
response.Write("<td width='13%'>" &
rs("tq_zjh") &
"</td>")
response.Write("<td width='13%'>" &
rs("ts_zjh") &
"</td>")
response.Write("</tr>")
response.Write("<tr>")
response.Write("<td>周实际</td>")
response.Write("<td width='13%'>" &
rs("yg_zsj") &
"</td>")
response.Write("<td width='13%'>" &
rs("hd_zsj") &
"</td>")
response.Write("<td width='13%'>" &
rs("ld_zsj") &
"</td>")
response.Write("<td width='13%'>" &
rs("dr_zsj") &
"</td>")
response.Write("<td width='13%'>" &
rs("tq_zsj") &
"</td>")
response.Write("<td width='13%'>" &
rs("ts_zsj") &
"</td>")
response.Write("</tr>")
response.Write("<tr>")
response.Write("<td>与日历进度差</td>")
response.Write("<td width='13%'>" &
rs("yg_cb") &
"</td>")
response.Write("<td width='13%'>" &
rs("hd_cb") &
"</td>")
response.Write("<td width='13%'>" &
rs("ld_cb") &
"</td>")
response.Write("<td width='13%'>" &
rs("dr_cb") &
"</td>")
response.Write("<td width='13%'>" &
rs("tq_cb") &
"</td>")
response.Write("<td width='13%'>" &
rs("ts_cb") &
"</td>")
response.Write("</tr>")
response.Write("</table>")
%>
</td>
</tr>
</table>
</center>
</div>
<%
end if
set rs=nothing
%>
</body>
</html>