📄 step4.asp
字号:
<!-- #include file = "../../../../include/asphead.asp" -->
<!-- #include file = "../../../../include/function.asp" -->
<%CheckUser()%>
<link href="../../../../include/main.css" rel="stylesheet" type="text/css">
<script src="../../../../include/function.js" type="text/javascript"></script>
<script ID="clientEventHandlersJS" LANGUAGE="javascript">
<!--
function LocalDC()
{
if(frmData.NeedChart[1].status==true)
{
if(frmData.ChartType.selectedIndex==0)
{
alert("您未选择图表类型,请选择。");
return false;
}
if(frmData.MainGroup.selectedIndex==0)
{
alert("您未选择主分类字段,请选择。");
return false;
}
if(frmData.Sum.selectedIndex==0)
{
alert("您未选择数据字段,请选择。");
return false;
}
}
return true;
}
function Pre()
{
window.navigate("step3.asp");
}
function Finish()
{
if(LocalDC()==true)
{
DisableButton();
frmData.target ="SaveArea";
frmData.action="savechart.asp";
frmData.submit();
}
}
function Cancel()
{
var discard;
discard=confirm(document.all.btnCancel.value+"报表设计吗?");
if(discard==true)
{
if(NewReport.value==1)
{
DisableButton();
document.frmData.target ="SaveArea";
document.frmData.action="../cancel.asp";
document.frmData.submit();
}
else
{
alert("尚未完成设计,暂不能查询和生成报表。");
parent.window.returnValue = true;
parent.window.close();
}
}
}
function DisableButton()
{
frmData.btnCancel.disabled =true;
frmData.btnPre.disabled =true;
frmData.btnNext.disabled =true;
}
function EnableButton()
{
frmData.btnCancel.disabled =false;
frmData.btnPre.disabled =false;
}
function window_onload()
{
//初始化主分类字段MainGroup
var myIndex,selectedIndex;
myIndex=0;
frmData.MainGroup.options[myIndex]=new Option("",0)
if(RowFieldCount>0)
{
myIndex=myIndex+1;
frmData.MainGroup.options[myIndex]=new Option(RowFieldCaption[0],RowFieldID[0])
}
if(ColumnFieldCount>0)
{
myIndex=myIndex+1;
frmData.MainGroup.options[myIndex]=new Option(ColumnFieldCaption[0],ColumnFieldID[0])
}
selectedIndex=0;
for(var i=0;i<=myIndex;i++)
{
if(frmData.MainGroup.options[i].value==MainGroupID)
{
selectedIndex=i;
break;
}
}
frmData.MainGroup.selectedIndex=selectedIndex;
//初始化NeedChart Option
if(frmData.MainGroup.selectedIndex>0)
frmData.NeedChart[1].status=true
else
frmData.NeedChart[0].status=true
//初始化SubGroup
SetSubGroup();
SetSubGroupIndex();
DisableItems();
}
function SetSubGroup()
{
var curIndex,curMainGroupID;
frmData.SubGroup.length =1;
frmData.SubGroup.selectedIndex =0;
frmData.SubGroup.options[0]=new Option("",0)
curIndex=frmData.MainGroup.selectedIndex;
if(curIndex>0)
{
curMainGroupID=frmData.MainGroup.options[curIndex].value
if(curMainGroupID==RowFieldID[0])
{
if(ColumnFieldCount>0)
{
frmData.SubGroup.options[1]=new Option(ColumnFieldCaption[0],ColumnFieldID[0])
}
}
else if(curMainGroupID==ColumnFieldID[0])
{
if(RowFieldCount>0)
{
frmData.SubGroup.options[1]=new Option(RowFieldCaption[0],RowFieldID[0])
}
}
}
}
function SetSubGroupIndex()
{
for(var i=0;i<=frmData.SubGroup.length-1;i++)
{
if(SubGroupID==frmData.SubGroup.options[i].value)
{
frmData.SubGroup.selectedIndex=i;
break;
}
}
}
function DisableSubGroup()
{
if(frmData.ChartType.value==Chart_Pie || frmData.NeedChart[1].status==false)
{
frmData.SubGroup.disabled=true;
frmData.chkAccumulate.disabled =true;
frmData.chkAccumulate.status=false;
}
else
{
frmData.SubGroup.disabled=false;
frmData.chkAccumulate.disabled =false;
}
}
function DisableItems()
{
var disabled;
if(frmData.NeedChart[1].status==true)
disabled=false
else
disabled=true
frmData.ChartType.disabled =disabled;
frmData.MainGroup.disabled =disabled;
frmData.Sum.disabled =disabled;
DisableSubGroup();
}
//-->
</script>
<%
dim WExcel
set WExcel=server.CreateObject("WExcel.Report")
dim NewReport,Cancel
NewReport=Request.Cookies("System")("NewReport")
if NewReport="1" then
Cancel="取消"
else
Cancel="退出"
end if
dim SheetID,ReportID
SheetID=Request.Cookies("System")("ReportSheetID")
ReportID=Request.Cookies("System")("ReportID")
dim ChartTypeOption, MainGroupOption, SubGroupOption, SumOption, GCScript
WExcel.GetChartOption cint(UserID), cint(SheetID), cint(ReportID), ChartTypeOption, SumOption,Accumulate, GCScript
Response.Write GCScript
CheckErr
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="window_onload()">
<table width="100%" border="0" align="center">
<tr height="35">
<td colspan=2>
<b>第4步:设置图表类型</b>
</td>
</tr>
<tr>
<td colspan=2>
主分类字段对应图形的横坐标,次分类字段对应<br>不同颜色的方块或线条,饼图只能有一个分类字段。
</td>
</tr>
<form METHOD="post" name="frmData">
<tr height=200 valign=top>
<td colspan=2>
<table width="100%" border="0" align="center">
<tr>
<td colspan=2>
<p align="center">
<input id="NeedChart" name="NeedChart" VALUE="0" type="radio" onclick="DisableItems()">不设置图表
<input id="NeedChart" name="NeedChart" VALUE="1" type="radio" onclick="DisableItems()">设置图表
</p>
</td>
</tr>
<tr>
<td width="40%">
<p align="right">
图表类型
</p>
</td>
<td width="60%">
<p align="left">
<select id="ChartType" name="ChartType" style="width:180px;" onchange="DisableSubGroup()">
<%=ChartTypeOption%>
</select>
</p>
</td>
</tr>
<tr>
<td width="40%">
<p align="right">
主分类字段
</p>
</td>
<td width="60%">
<p align="left">
<select id="MainGroup" name="MainGroup" style="width:180px;" onchange="SetSubGroup()">
</select>
</p>
</td>
</tr>
<tr>
<td width="40%">
<p align="right">
次分类字段
</p>
</td>
<td width="60%">
<p align="left">
<select id="SubGroup" name="SubGroup" style="width:180px;">
</select>
</p>
</td>
</tr>
<tr>
<td width="40%">
<p align="right">
数据字段
</p>
</td>
<td width="60%">
<p align="left">
<select id="Sum" name="Sum" style="width:180px;">
<%=SumOption%>
</select>
</p>
</td>
</tr>
<tr>
<td width="40%">
</td>
<td width="60%">
<p align="left">
<INPUT id="chkAccumulate" name="chkAccumulate" <%if Accumulate="1" then%>checked<%end if%> type=checkbox>附带累计数
</p>
</td>
</tr>
</table>
</td>
</tr>
<tr height="45" valign="bottom">
<td colspan=2>
<table align="center" width="50%">
<tr>
<td width="33%"><input id="btnCancel" type="button" value="<%=Cancel%>" name="btnCancel" style="cursor:hand; WIDTH: 65px; HEIGHT: 24px" LANGUAGE="javascript" onclick="return Cancel()"></td>
<td width="33%"><input name="btnPre" id="btnPre" type="button" value="上一步" style="cursor:hand; WIDTH: 65px; HEIGHT: 24px" LANGUAGE="javascript" onclick="return Pre()"></td>
<td width="33%"><input id="btnNext" type="button" value="完成" name="btnNext" style="cursor:hand; WIDTH: 65px; HEIGHT: 24px" LANGUAGE="javascript" onclick="return Finish()"></td>
</tr>
</table>
</td>
</tr>
</form>
<iframe id="SaveArea" name="SaveArea" style="VISIBILITY: hidden" width="0" height="0" frameborder="0" src="">
</iframe>
</table>
<input TYPE="hidden" NAME="NewReport" value="<%=NewReport%>">
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -