InitBasfTcc11

This commit is contained in:
2024-05-08 16:27:28 +08:00
commit f1000143a0
3754 changed files with 382456 additions and 0 deletions
@@ -0,0 +1 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CalculateChinaEx.aspx.cs" Inherits="FineUIPro.Web.Common.ReportPrint.CalculateChinaEx" CodePage="936" %>
@@ -0,0 +1,177 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.Common.ReportPrint
{
public partial class CalculateChinaEx : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string strFunc = Request.QueryString["func"].ToString().Trim();
string reportId = Request.QueryString["reportId"].ToString().Trim();
if (strFunc == "GetSqlResult")
{
string strSql = Server.UrlDecode(Request.QueryString["sql"].ToString().Trim());
string strtype = Request.QueryString["dtype"].ToString().Trim();
string strSql2 = Server.UrlDecode(Request.QueryString["sql2"].ToString().Trim());
if (strSql != "" && strSql != null && strtype != "" && strtype != null)
{
// string Connstr = "Provider=SQLNCLI10.1;Integrated Security='';Persist Security Info=False;User ID=sa;Initial Catalog=GOLDB;Data Source=(local);Initial File Name='';Server SPN=''";
// ADODB.Connection Conn = new ADODB.Connection();
// coReportEngine.ReportSvr rsave = new coReportEngine.ReportSvr();
// Conn.Open(Connstr, "", "", -1);
string strTemp = "";
string strValue = "";
int intstrCountQuery = Request.QueryString.Count;
if (intstrCountQuery > 5)
{
for (int i = 0; i < intstrCountQuery; i++)
{
strTemp = Server.UrlDecode(Request.QueryString.GetKey(i).ToString());
if (strTemp != "" && strTemp != "undefined" && strTemp != "func" && strTemp != "reportId" && strTemp != "dtype" && strTemp != "sql" && strTemp != "sql2")
{
strValue = Server.UrlDecode(Request.QueryString[i].ToString());
strSql = strSql.Replace("${" + strTemp + "}", strValue);
strSql2 = strSql2.Replace("${" + strTemp + "}", strValue);
}
}
}
if (strtype == "2")
{
// Response.BinaryWrite((byte[])rsave.GetMainSubData(Conn, strSql, strSql2));
int iFieldCount = 0;
string xmlstring;
xmlstring = "=" + "\n";
DataSet dataset = new DataSet();
dataset = BLL.SQLHelper.RunSqlString(strSql, "ReportServer");
DataTableReader obRead = dataset.CreateDataReader();
iFieldCount = obRead.FieldCount;
for (int i = 0; i < iFieldCount; i++)
{
if (i == iFieldCount - 1)
{
xmlstring = xmlstring + obRead.GetName(i).ToString() + "\n";
}
else
{
xmlstring = xmlstring + obRead.GetName(i).ToString() + "\t";
}
}
if (obRead.Read())
{
for (int i = 0; i < iFieldCount; i++)
{
if (i == iFieldCount - 1)
{
xmlstring = xmlstring + obRead[obRead.GetName(i).ToString()].ToString().Replace("\r\n", "&at;").Replace("\t", " ").Replace("0:00:00", "") + "\n";
}
else
{
xmlstring = xmlstring + obRead[obRead.GetName(i).ToString()].ToString().Replace("\r\n", "&at;").Replace("\t", " ").Replace("0:00:00", "") + "\t";
}
}
}
xmlstring = xmlstring + "=" + "\n";
DataSet dataset1 = new DataSet();
dataset1 = BLL.SQLHelper.RunSqlString(strSql2, "ReportServer");
DataTableReader obRead1 = dataset1.CreateDataReader();
iFieldCount = obRead1.FieldCount;
for (int i = 0; i < iFieldCount; i++)
{
if (i == iFieldCount - 1)
{
xmlstring = xmlstring + obRead1.GetName(i).ToString() + "\n";
}
else
{
xmlstring = xmlstring + obRead1.GetName(i).ToString() + "\t";
}
}
while (obRead1.Read())
{
for (int i = 0; i < iFieldCount; i++)
{
if (i == iFieldCount - 1)
{
xmlstring = xmlstring + obRead1[obRead1.GetName(i).ToString()].ToString().Replace("\r\n", "&at;").Replace("\t", " ").Replace("0:00:00", "") + "\n";
}
else
{
xmlstring = xmlstring + obRead1[obRead1.GetName(i).ToString()].ToString().Replace("\r\n", "&at;").Replace("\t", " ").Replace("0:00:00", "") + "\t";
}
}
}
Response.Write(xmlstring);
}
else
{
// Response.BinaryWrite((byte[])rsave.GetData(Conn, strSql));
int iFieldCount = 0;
string xmlstring;
xmlstring = "";
DataSet dataset = new DataSet();
//dataset = BLL.SQLHelper.RunSqlString(strSql, "TempTable");
//DataTableReader obRead = dataset.CreateDataReader();
SqlDataReader obRead = null;
SqlConnection conn = new SqlConnection(BLL.Funs.ConnString);
try
{
conn.Open();
SqlCommand cmd = new SqlCommand(strSql, conn);
obRead = cmd.ExecuteReader();
iFieldCount = obRead.FieldCount;
for (int i = 0; i < iFieldCount; i++)
{
if (i == iFieldCount - 1)
{
xmlstring = xmlstring + obRead.GetName(i).ToString() + "\n";
}
else
{
xmlstring = xmlstring + obRead.GetName(i).ToString() + "\t";
}
}
while (obRead.Read())
{
for (int i = 0; i < iFieldCount; i++)
{
if (i == iFieldCount - 1)
{
xmlstring = xmlstring + obRead[obRead.GetName(i).ToString()].ToString().Replace("\r\n", "&at;").Replace("\t", " ").Replace("0:00:00", "").Replace(".000", "") + "\n";
}
else
{
xmlstring = xmlstring + obRead[obRead.GetName(i).ToString()].ToString().Replace("\r\n", "&at;").Replace("\t", " ").Replace("0:00:00", "").Replace(".000", "") + "\t";
}
}
}
}
finally
{
obRead.Close();
conn.Close();
}
Response.Write(xmlstring);
}
}
}
}
}
}
}
@@ -0,0 +1,15 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Common.ReportPrint {
public partial class CalculateChinaEx {
}
}
@@ -0,0 +1,313 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ExPrintSet.aspx.cs" Inherits="FineUIPro.Web.Common.ReportPrint.ExPrintSet" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<link rel="stylesheet" type="text/css" href="css/chinaexcel.css"/>
<script charset="gb2312" language="javascript" type="text/javascript" src="js/Common.js" ></script>
<script src="js/functions.vbs" language="vbscript" type="text/vbscript"></script>
<script language="javascript" type="text/javascript">
function InitFontname() {
strFontnames = ChinaExcel.GetDisplayFontNames();
var arrFontname = strFontnames.split('|');
arrFontname.sort();
var i;
var sysFont;
sysFont = "宋体";
for (i = 0; i < arrFontname.length; i++) {
if (arrFontname[i] != "") {
var oOption = document.createElement("OPTION");
FontNameSelect.options.add(oOption);
oOption.innerText = arrFontname[i];
oOption.value = arrFontname[i];
if (arrFontname[i] == sysFont) oOption.selected = true;
}
}
}
function window_onresize() {
var lWidth = document.body.offsetWidth;
if (lWidth <= 0) lWidth = 1;
ChinaExcel.style.width = lWidth;
var lHeight = document.body.offsetHeight - parseInt(ChinaExcel.style.top);
if (lHeight <= 0) lHeight = 1;
ChinaExcel.style.height = lHeight;
}
function window_onload() {
var aw = screen.availWidth;
var ah = screen.availHeight;
ChinaExcel.border = 0;
ChinaExcel.style.left = 0;
ChinaExcel.style.top = idTBFormat.offsetTop + idTBFormat.offsetHeight;
var lWidth = document.body.offsetWidth;
if (lWidth <= 0) lWidth = 1;
ChinaExcel.style.width = lWidth;
var lHeight = document.body.offsetHeight - parseInt(ChinaExcel.style.top);
if (lHeight <= 0) lHeight = 1;
ChinaExcel.style.height = lHeight;
ChinaExcel.style.display = "";
ChinaExcel.SetMaxRows(18);
ChinaExcel.SetMaxCols(8);
ChinaExcel.DesignMode = true;
//默认状态不显示报表设计界面(如果默认打开报表,有时候readyState返回3,打开会失败) tcf
ChinaExcel.SetOnlyShowTipMessage(true);
InitFontname();
init();
}
function OnSetOnePrintPageDetailZoneRows() {
nPageRows = ChinaExcel.GetOnePrintPageDetailZoneRows()
varvalue = window.prompt("说明:打印时每页显示的行数,不包括表头和表尾页脚、页前脚的行数。请输入每页打印的行数:", "设置每页打印的行数");
nRow=parseInt(varvalue);
if (!isNaN(nRow)) {
ChinaExcel.SetOnePrintPageDetailZoneRows(nRow);
}
}
// 自动折行设置
function Wordwrap() {
if (ChinaExcel.AutoWrap == false) {
ChinaExcel.AutoWrap = true;
alert("该单元格已设为自动折行,请保存!");
}
else {
ChinaExcel.AutoWrap = false;
alert("该单元格已取消自动折行,请保存!");
}
}
</script>
<script for="cbButton" event="onclick()" language="JavaScript" >
return onCbClickEvent(this);
</script>
</head>
<%--<script type="text/javascript">
window.onload = function () {
setInit('ReadExReportFile.aspx?reportId='+<%=reportId %>);
}
</script>--%>
<body id="mainbody" class="mainBody" language="javascript" onresize="return window_onresize()"
onload="return window_onload()">
<form id ="form1" runat="server">
<table class="cbToolbar" style="width: 100%;" border="0" cellpadding="1" cellspacing="1">
<tr>
<td >
&nbsp;
<%--<a href="#" class="tbButton" onclick="retDesgin()" title="设计" ><img alt="" style="vertical-align:middle" src="images/desgin.gif" width="16" height="16"/></a> --%>
<a href="#" class="tbButton" onclick="onFileOpen()" title="打开本地文件" ><img alt="" style="vertical-align:middle" src="images/open.gif" width="16" height="16"/></a>
</td>
<td >
<a href="#" class="tbButton" onclick="onReportSave('<%=reportId %>','<%=reportName %>','<%=ProjectId %>')" title="保存文件"><img alt="" style="vertical-align:middle;" src="images/save.gif" width="16" height="16"/></a>
</td>
<td>
<a href="#" class="tbButton" onclick="FileSave()" title="报表导出"><img alt="" style="vertical-align:middle" src="images/export.gif" width="16" height="16"/></a>
</td>
<td>
<a href="#" class="tbButton" onclick="PrintSetup()" title="打印设置"><img alt="" style="vertical-align:middle" src="images/printsetup.gif" width="16" height="16"/></a>
</td>
<td >
<a href="#" class="tbButton" onclick="PrintpaperSet()" title="页面设置"><img alt="" style="vertical-align:middle" src="images/printpaperset.gif" width="16" height="16"/></a>
</td>
<td class="tbDivider">
<a class="tbButton" onclick="OnSetOnePrintPageDetailZoneRows()" title="设置每页打印的行数" href="#"><img align="middle" alt="" src="images/desgin.gif" width="16" height="16" /></a>
<%-- <a href="#" class="tbButton" onclick="OnSetOnePrintPageDetailZoneRows()" title="设置每页打印的行数"><img alt="" style="vertical-align:middle" src="images/bold.gif" width="16" height="16"/></a>--%>
</td>
<td>
<a href="#" class="tbButton" onclick="onCut()" title="剪切"><img alt="" style="vertical-align:middle" src="images/cut.gif" width="16" height="16"/></a>
</td>
<td>
<a href="#" class="tbButton" onclick="onCopy()" title="复制"><img alt="" style="vertical-align:middle" src="images/copy.gif" width="16" height="16"/></a>
</td>
<td class="tbDivider">
<a href="#" class="tbButton" onclick="onPaste()" title="粘贴"><img alt="" style="vertical-align:middle" src="images/paste.gif" width="16" height="16"/></a>
</td>
<td>
<a href="#" class="tbButton" id="cmdCurrency" name="cbButton" title="货币符号" ><img alt="" style="vertical-align:middle" src="images/currency.gif" width="16" height="16"/></a>
</td>
<td>
<a href="#" class="tbButton" id="cmdPercent" name="cbButton" title="百分号"><img alt="" style="vertical-align:middle" src="images/percent.gif" width="16" height="16"/></a>
</td>
<td class="tbDivider">
<a href="#" class="tbButton" id="cmdThousand" name="cbButton" title="千分位"><img alt="" style="vertical-align:middle" src="images/thousand.gif" width="16" height="16"/></a>
</td>
<td>
<a href="#" class="tbButton" onclick="OnSetCellShowStyle()" title="设置单元样式"><img alt="" style="vertical-align:middle" src="images/cellstyle.gif" width="16" height="16"/></a>
</td>
<td><a class="tbButton" id="cmdChartWzd" title="图表向导" href="#" name="cbButton"><img alt="" style="vertical-align:middle" src="images/chartw.gif" width="16" height="16" /></a></td>
<td>
<a href="#" class="tbButton" onclick="SlashSet()" title="单元斜线设置"><img alt="" style="vertical-align:middle" src="images/slashset.gif" width="16" height="16"/></a>
</td>
<td>
<a href="#" class="tbButton" onclick="Wordwrap()" title="自动折行"><img alt="" style="vertical-align:middle" src="images/wordwrap.gif" width="16" height="16"/></a>
</td>
<td >
<asp:ImageButton ID="undo" runat="server" class="tbButton" OnClientClick="return confirm(&quot;确定要恢复初始设置吗?&quot;);"
ImageUrl="images/undo.gif" ToolTip="恢复初始设置" Visible="false"
style="vertical-align:middle" width="16" height="16" onclick="undo_Click" />
</td>
<td>
<asp:ImageButton ID="imgReturn" runat="server" class="tbButton"
ImageUrl="images/return.gif" ToolTip="返回"
style="vertical-align:middle" width="16px" height="16px"
onclick="imgReturn_Click"/>
</td>
<td style="width:100%">
<%--<a href="#" class="tbButton" onclick="DefineField('<%=reportName %>')" title="定义字段" ><img alt="" style="vertical-align:middle" src="images/export.gif" width="16" height="16"/></a>--%>
</td>
</tr>
</table>
</form>
<table class="cbToolbar" id="idTBFormat" cellpadding='0' cellspacing='0' width="100%">
<tr>
<td id="cmdFontName" title="字体">
<select name="FontNameSelect" style="width: 225px; height: 23px" onchange="changeFontName(FontNameSelect.value)"
accesskey="v" size="1">
</select>
</td>
<td class="tbDivider" id="cmdFontSize" title="字号">
<select name="FontSizeSelect" style="width: 67px; height: 23px" onchange="changeFontSize(FontSizeSelect.value)"
accesskey="v" size="1">
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option selected="selected" value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="14">14</option>
<option value="16">16</option>
<option value="18">18</option>
<option value="20">20</option>
<option value="22">22</option>
<option value="24">24</option>
<option value="26">26</option>
<option value="28">28</option>
<option value="30">30</option>
<option value="36">36</option>
<option value="42">42</option>
<option value="48">48</option>
<option value="72">72</option>
<option value="100">100</option>
<option value="150">150</option>
<option value="300">300</option>
<option value="500">500</option>
<option value="800">800</option>
<option value="1200">1200</option>
<option value="2000">2000</option>
</select>
</td>
<td>
<a class="tbButton" id="cmdBold" title="粗体" href="#" name="cbButton">
<img align="middle" alt="" src="images/bold.gif" width="16" height="16" /></a>
</td>
<td>
<a class="tbButton" id="cmdItalic" title="斜体" href="#" name="cbButton">
<img align="middle" alt="" src="images/italic.gif" width="16" height="16" /></a>
</td>
<td>
<a class="tbButton" id="cmdUnderline" title="下划线" href="#" name="cbButton">
<img align="middle" alt="" src="images/underline.gif" width="16" height="16" /></a>
</td>
<td>
<a class="tbButton" id="cmdBackColor" title="背景色" href="#" name="cbButton">
<img align="middle" alt="" src="images/backcolor.gif" width="16" height="16" /></a>
</td>
<td class="tbDivider">
<a class="tbButton" id="cmdForeColor" title="前景色" href="#" name="cbButton">
<img align="middle" alt="" src="images/forecolor.gif" width="16" height="16" /></a>
</td>
<td>
<a class="tbButton" id="cmdAlignLeft" title="居左对齐" href="#" name="cbButton">
<img align="middle" alt="" src="images/alignleft.gif" width="16" height="16" /></a>
</td>
<td>
<a class="tbButton" id="cmdAlignCenter" title="居中对齐" href="#" name="cbButton">
<img align="middle" alt="" src="images/aligncenter.gif" width="16" height="16" /></a>
</td>
<td>
<a class="tbButton" id="cmdAlignRight" title="居右对齐" href="#" name="cbButton">
<img align="middle" alt="" src="images/alignright.gif" width="16" height="16" /></a>
</td>
<td>
<a class="tbButton" id="cmdAlignTop" title="居上对齐" href="#" name="cbButton">
<img align="middle" alt="" src="images/aligntop.gif" width="16" height="16" /></a>
</td>
<td>
<a class="tbButton" id="cmdAlignMiddle" title="垂直居中" href="#" name="cbButton" sticky="true">
<img align="middle" alt="" src="images/alignmiddle.gif" width="16" height="16" /></a>
</td>
<td class="tbDivider">
<a class="tbButton" id="cmdAlignBottom" title="居下对齐" href="#" name="cbButton">
<img align="middle" alt="" src="images/alignbottom.gif" width="16" height="16" /></a>
</td>
<td id="cmdBoderType" title="边框类型">
<select name="BorderTypeSelect" style="width: 109px; height: 23px" accesskey="v"
size="1">
<option value="0" selected="selected">细线</option>
<option value="1">中线</option>
<option value="2">粗线</option>
<option value="3">点线</option>
<option value="4">虚线</option>
<option value="5">点划线</option>
<option value="6">点点划线</option>
</select>
</td>
<td>
<a class="tbButton" id="cmdDrawBorder" title="画边框线" href="#" name="cbButton">
<img align="middle" alt="" src="images/border.gif" width="16" height="16" /></a>
</td>
<td>
<a class="tbButton" id="cmdEraseBorder" title="抹边框线" href="#" name="cbButton">
<img align="middle" alt="" src="images/erase.gif" width="16" height="16" /></a>
</td>
<td class="tbDivider" width="100%">
</td>
</tr>
</table>
<table style="width: 100%;" border="0" cellpadding="1" cellspacing="1">
<tr>
<td style="width: 100%;">
<object id="ChinaExcel" name="ChinaExcel" style="left: 0px; top: 0px; width: 100%; height:520px; text-align:center;"
classid="CLSID:15261F9B-22CC-4692-9089-0C40ACBDFDD8" codebase="../../Downloads/chinaexcelweb.cab#version=3,8,9,2">
<param name="_Version" value="131072" />
<param name="_ExtentX" value="28205" />
<param name="_ExtentY" value="13229" />
<param name="_StockProps" value="0" />
</object>
</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
function init() {
setInit('ReadExReportFile.aspx?reportId='+<%=reportId %>+'&projectId='+"<%=ProjectId %>");
ChinaExcel.SetOnlyShowTipMessage(false);
}
</script>
<script language="vbscript">
Sub ChinaExcel_ShowCellChanged(Row, Col)
FontSizeSelect.Value = ChinaExcel.CellFontSize
FontNameSelect.value = ChinaExcel.CellFontName
End Sub
</script>
</body>
</html>
@@ -0,0 +1,142 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Data.SqlClient;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.Common.ReportPrint
{
public partial class ExPrintSet : PageBase
{
/// <summary>
/// 部门报表Id
/// </summary>
protected string reportId
{
get
{
return (string)ViewState["reportId"];
}
set
{
ViewState["reportId"] = value;
}
}
/// <summary>
/// rb
/// </summary>
protected string reportName
{
get
{
return (string)ViewState["reportName"];
}
set
{
ViewState["reportName"] = value;
}
}
/// <summary>
/// 项目
/// </summary>
protected string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 替换参数
/// </summary>
protected string ReplaceParameter
{
get
{
return (string)ViewState["ReplaceParameter"];
}
set
{
ViewState["ReplaceParameter"] = value;
}
}
/// <summary>
/// 隐藏值
/// </summary>
protected string HideValue
{
get
{
return (string)ViewState["HideValue"];
}
set
{
ViewState["HideValue"] = value;
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
reportId = Request.QueryString["reportId"];
reportName = Request.QueryString["reportName"];
ProjectId = Request.QueryString["projectId"];
ReplaceParameter = Request.QueryString["replaceParameter"];
HideValue = Request.QueryString["rd"];
}
}
/// <summary>
/// 恢复初始设置
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void undo_Click(object sender, ImageClickEventArgs e)
{
string str = "UPDATE dbo.Common_ReportServer SET TabContent = InitTabContent WHERE ReportId = @ReportId and ProjectId = @ProjectId";
SqlParameter[] parameter = new SqlParameter[]
{
new SqlParameter("@ProjectId",ProjectId),
new SqlParameter("@ReportId",reportId)
};
try
{
BLL.SQLHelper.ExecutSql(str, parameter);
//BLL.SQLHelper.RunSqlString(str, "ReportServer");
}
catch (Exception ex)
{
Response.Write(ex.Message);
Response.Write(ex.Source);
Response.End();
}
finally
{
}
}
/// <summary>
/// 返回
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void imgReturn_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("PrintDesigner.aspx");
}
}
}
@@ -0,0 +1,51 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Common.ReportPrint {
public partial class ExPrintSet {
/// <summary>
/// Head1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// undo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.ImageButton undo;
/// <summary>
/// imgReturn 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.ImageButton imgReturn;
}
}
@@ -0,0 +1,53 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ExReportPrint.aspx.cs" Inherits="FineUIPro.Web.Common.ReportPrint.ExReportPrint" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>报表打印</title>
<style type="text/css">
A:link {text-decoration:none; color:"black"; font-size:10pt}
A:visited {text-decoration:none; color:"black"; font-size:10pt}
A:active {text-decoration:none; color:"black"; font-size:10pt}
A:hover {text-decoration:none; color:"#FF0000"; font-size:10pt}
</style>
<script src="js/Common.js" type="text/jscript"></script>
</head>
<script type="text/javascript">
window.onload = function () {
setInit('ReadExReportFile.aspx?reportId='+<%=reportId %>+'&projectId='+"<%=projectId %>");
ReplaceParameter('<%=replaceParameter %>');
CalculateTab('<%=reportId %>');
// SetCellValue();
SetCellValUseVarName('<%=varValue %>')
}
</script>
<body>
<form id ="form1" runat="server">
<table style="width: 100%;" border="0">
<tr>
<td>
<p>
<img alt="" style="vertical-align:middle" src="images/printsetup.gif" width="16" height="16"/><a href="#" onclick="PrintSetup()" >打印设置</a> |
<img alt="" style="vertical-align:middle" src="images/print.gif" width="16" height="16"/><a href="#" onclick="FilePrint()" >打印</a> |
<img alt="" style="vertical-align:middle" src="images/printpreview.gif" width="16" height="16"/><a href="#" onclick="Preview()" >打印预览</a> |
<img alt="" style="vertical-align:middle" src="images/export.gif" width="16" height="16"/><a href="#" onclick="onFileSave()" >输出</a> |
</p>
</td>
</tr>
<tr>
<td style="width: 100%;">
<object id="ChinaExcel" style="left: 0px; top: 0px; width: 100%; height:680px;text-align:center;" classid="CLSID:15261F9B-22CC-4692-9089-0C40ACBDFDD8"
name="ChinaExcel" CODEBASE="../../downloads/chinaexcelweb.cab#version=3,8,9,2">
</object>
</td>
</tr>
</table>
&nbsp;
</form>
</body>
</html>
@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.Common.ReportPrint
{
public partial class ExReportPrint : System.Web.UI.Page
{
protected string replaceParameter;
protected string reportId;
protected string varValue;
protected string projectId;
//protected string hideValue;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
replaceParameter = Request.QueryString["replaceParameter"];
reportId = Request.QueryString["reportId"];
projectId = Request.QueryString["projectId"];
varValue = HttpUtility.UrlDecode(Request.QueryString["varValue"]).Replace(",","/");
//hideValue = Server.UrlDecode(Request.QueryString["rd"]);
//varValue=new string[2]{"您好!","中国"};
//varValue = "您好!" + "|" + "中国";
}
}
}
}
@@ -0,0 +1,33 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Common.ReportPrint {
public partial class ExReportPrint {
/// <summary>
/// Head1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
}
}
@@ -0,0 +1,60 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PrintDesigner.aspx.cs" Inherits="FineUIPro.Web.common.ReportPrint.PrintDesigner" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>报表设计</title>
<link href="../../../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="RegionPanel1" runat="server" />
<f:RegionPanel ID="RegionPanel1" ShowBorder="false" runat="server" Margin="5px">
<Regions>
<%-- <f:Region ID="Region1" ShowBorder="false" ShowHeader="false" RegionPosition="Left"
BodyPadding="0 5 0 0" Width="300px" Layout="Fit" runat="server"
EnableCollapse="true">
<Items>
<f:Panel runat="server" ID="panel2" RegionPosition="Left" RegionSplit="true" EnableCollapse="true"
Width="400" Title="项目" TitleToolTip="项目报表设置" ShowBorder="true" ShowHeader="true"
BodyPadding="5px" IconFont="ArrowCircleLeft">
<Items>
<f:Tree ID="tvProject" Width="350" Height="500" EnableCollapse="true" ShowHeader="false"
OnNodeCommand="tvProject_NodeCommand" AutoLeafIdentification="true" runat="server">
</f:Tree>
</Items>
</f:Panel>
</Items>
</f:Region>--%>
<f:Region ID="Region2" ShowBorder="true" ShowHeader="false" Position="Center" Layout="VBox"
BoxConfigAlign="Stretch" BoxConfigPosition="Left" runat="server">
<Items>
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:DropDownList ID="drpPrintReport" runat="server" Label="选择设计报表" LabelWidth="150px"
MarginRight="100px" EnableSimulateTree="true" CompareType="String" CompareValue="null"
CompareOperator="NotEqual">
</f:DropDownList>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnReportDesigner" Icon="SystemSave" runat="server" Text="报表设计" ValidateForms="SimpleForm1"
OnClick="btnReportDesigner_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
</Items>
</f:Region>
</Regions>
</f:RegionPanel>
</form>
</body>
</html>
@@ -0,0 +1,85 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
namespace FineUIPro.Web.common.ReportPrint
{
public partial class PrintDesigner : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.drpPrintReport.DataTextField = "Key";
drpPrintReport.DataValueField = "Value";
drpPrintReport.DataSource = BLL.Common_ReportPrintService.PrintReport();
drpPrintReport.DataBind();
Funs.FineUIPleaseSelect(drpPrintReport);
//InitTreeMenu();
}
}
#region
/// <summary>
/// 树加载
/// </summary>
//private void InitTreeMenu()
//{
// this.tvProject.Nodes.Clear();
// this.tvProject.ShowBorder = false;
// this.tvProject.ShowHeader = false;
// this.tvProject.EnableIcons = true;
// this.tvProject.AutoScroll = true;
// this.tvProject.EnableSingleClickExpand = true;
// TreeNode rootNode = new TreeNode();
// rootNode.Text = "项目";
// rootNode.NodeID = "0";
// rootNode.Expanded = true;
// this.tvProject.Nodes.Add(rootNode);
// var projects = from x in Funs.DB.Base_Project orderby x.ProjectCode select x;
// foreach (var item in projects)
// {
// TreeNode node = new TreeNode();
// node.Text = item.ProjectName;
// node.NodeID = item.ProjectId;
// node.EnableClickEvent = true;
// rootNode.Nodes.Add(node);
// }
//}
#endregion
#region Tree点击事件
/// <summary>
/// Tree点击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void tvProject_NodeCommand(object sender, TreeCommandEventArgs e)
{
//string projectId = this.tvProject.SelectedNodeID;
}
#endregion
protected void btnReportDesigner_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.PrintDesignerMenuId, Const.BtnSave))
{
//if (this.tvProject.SelectedNodeID != null && this.tvProject.SelectedNodeID != "0")
//{
//BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, this.drpPrintReport.SelectedItem.Text);
Response.Redirect("ExPrintSet.aspx?reportId=" + this.drpPrintReport.SelectedValue + "&reportName=" + this.drpPrintReport.SelectedItem.Text + "&projectId=0");
//}
}
else
{
ShowNotify("您没有这个权限,请与管理员联系!");
}
}
}
}
@@ -0,0 +1,96 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.common.ReportPrint {
public partial class PrintDesigner {
/// <summary>
/// Head1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// RegionPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RegionPanel RegionPanel1;
/// <summary>
/// Region2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Region Region2;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// drpPrintReport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpPrintReport;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnReportDesigner 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnReportDesigner;
}
}
@@ -0,0 +1,16 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReadExReportFile.aspx.cs" Inherits="FineUIPro.Web.Common.ReportPrint.ReadExReportFile" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
@@ -0,0 +1,78 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.Common.ReportPrint
{
public partial class ReadExReportFile : PageBase
{
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
this.ShowReportContent();
}
/// <summary>
/// 获取报表对应模板信息
/// </summary>
/// <param name="str"></param>
/// <returns></returns>
public DataTable GetData(string str)
{
DataTable dt = new DataTable();
try
{
string strSql = "SELECT * FROM dbo.Common_ReportServer WHERE ReportId = @ReportId and ProjectId = @ProjectId";
SqlParameter[] parameter = new SqlParameter[]
{
new SqlParameter("@ProjectId",Request.QueryString["projectId"].ToString()),
new SqlParameter("@ReportId",str)
};
dt = BLL.SQLHelper.GetDataTableRunText(strSql, parameter);
}
catch (Exception e)
{
Response.Write(e.Message);
Response.Write(e.Source);
Response.End();
}
finally
{
}
return dt;
}
/// <summary>
/// 获取模板内容
/// </summary>
private void ShowReportContent()
{
if (!string.IsNullOrEmpty(Request.QueryString["reportId"].ToString()))
{
string reportId = Request.QueryString["reportId"].ToString().Trim();
DataTable dt;
dt = GetData(reportId);
if (dt != null)
{
if (dt != null && dt.Rows.Count > 0)
{
string tabContent = dt.Rows[0]["TabContent"].ToString().Trim();
Response.Write(tabContent);
}
}
}
}
}
}
@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Common.ReportPrint {
public partial class ReadExReportFile {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
}
}
@@ -0,0 +1 @@
<%@ Page Language="C#" ValidateRequest="false" AutoEventWireup="true" CodeBehind="SaveTabFile.aspx.cs" Inherits="FineUIPro.Web.Common.ReportPrint.SaveTabFile" %>
@@ -0,0 +1,84 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.Common.ReportPrint
{
public partial class SaveTabFile : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
SaveFile();
}
}
/// <summary>
/// 执行SQL语句
/// </summary>
/// <param name="str"></param>
public void ExecSaveFile(string str, IDataParameter[] parameters)
{
try
{
BLL.SQLHelper.ExecutSql(str, parameters);
}
catch (Exception e)
{
Response.Write(e.Message);
Response.Write(e.Source);
Response.End();
}
finally
{
}
}
/// <summary>
/// 保存模板文件
/// </summary>
public void SaveFile()
{
string projectId = Request.Form["projectId"].ToString();
string reportId = Request.Form["reportId"].ToString();
string tabContent = Request.Form["tabContent"].ToString();
string reportName = Request.Form["reportName"].ToString();
string strSql = "SELECT COUNT(ReportId) FROM dbo.Common_ReportServer WHERE ReportId = @ReportId and ProjectId = @ProjectId";
SqlParameter[] parameter = new SqlParameter[]
{
new SqlParameter("@ProjectId",projectId),
new SqlParameter("@ReportId",reportId)
};
string reportCount = BLL.SQLHelper.GetStr(strSql, parameter);
string str = string.Empty;
if (reportCount == "0")
{
str = "INSERT INTO dbo.Common_ReportServer(ReportId,TabContent,ReportName,ProjectId) VALUES('" + reportId + "','" + tabContent + "','" + reportName + "','" + projectId + "')";
this.ExecSaveFile(str, null);
}
else
{
str = "UPDATE dbo.Common_ReportServer SET TabContent = '" + tabContent + "',ReportName='" + reportName + "' WHERE ReportId = @ReportId and ProjectId = @ProjectId";
SqlParameter[] parameter1 = new SqlParameter[]
{
new SqlParameter("@ProjectId",projectId),
new SqlParameter("@ReportId",reportId)
};
this.ExecSaveFile(str, parameter1);
}
Response.Write("保存成功");
}
}
}
@@ -0,0 +1,15 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Common.ReportPrint {
public partial class SaveTabFile {
}
}
@@ -0,0 +1,76 @@
.mainBody
{
BACKGROUND-COLOR:buttonface;
MARGIN:0;
OVERFLOW-Y:hidden;
}
.cbToolbar
{
HEIGHT:27px;
WIDTH:100%;
PADDING:0px;
BACKGROUND-COLOR:buttonface;
}
.tbDivider
{
BORDER-RIGHT:2px groove;
}
.tbButton, .tbButtonDown, .tbButtonRaise
{
COLOR:buttontext;
CURSOR:hand;
HEIGHT:23;
BORDER:1px solid buttonface;
PADDING:2px 2px 2px 2px;
TEXT-DECORATION:none;
MARGIN-TOP:0;
}
.tbButtonDown
{
BORDER-COLOR:threeddarkshadow threedhighlight threedhighlight threeddarkshadow;
}
.tbDisabled
{
FILTER:alpha(opacity=35);
CURSOR:hand;
}
.fbButton
{
BORDER:1px solid;
BORDER-COLOR:menu;
HEIGHT:18px;
WIDTH:18px;
CURSOR:hand;
MARGIN:0;
PADDING:0;
MARGIN:0;
VERTICAL-ALIGN:TOP;
}
.AttachTable, .cbToolbar, .cbSubmenu, .fldFont, .fldText, .msgHeader, .fldLabel,
.trButtons, .msgViewer, .appointment, .rnOnlineBar, .viewStatusBar,
.appointmentBody, .tabHeader, BODY
{
FONT-SIZE:x-small;
}
.cbToolbar IMG, .cbSubmenu IMG
{
BORDER:none;
HEIGHT:16px;
WIDTH:16px;
MARGIN-RIGHT:3px;
}
.cbToolbar TD
{
VERTICAL-ALIGN:middle;
}
.monthlyDayHeader, .FORMATBAR, .cbToolbar, .btnRecip, .tbButtonRaise,
.tbButton A:hover, .tbButton:hover
{
BORDER:1px solid;
BORDER-COLOR:threedhighlight threedshadow threedshadow threedhighlight;
}
SELECT, INPUT, TEXTAREA, BUTTON, TABLE
{
FONT-SIZE:10pt;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 866 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 848 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 866 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 863 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 900 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 859 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 863 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 920 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 892 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 900 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 874 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 945 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 887 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 863 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 896 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 868 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 888 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 906 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 897 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 898 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 848 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 874 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 886 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 932 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 938 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 913 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 937 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 892 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 859 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 879 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 848 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 866 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 859 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 863 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 866 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 844 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 874 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

@@ -0,0 +1,684 @@
//实现报表打开的操作
function setInit(strTab)
{
var obChinaExcel = document.getElementById('ChinaExcel');
obChinaExcel.SetPath('/'); //http://website/test/ceuser/ceuser.dat 能否访问到
var ret = obChinaExcel.Login("金财软件", "6c048396fdf663df323ad7d1dd6eff17", "安徽金财高新技术工程有限公司");
//alert(ret);
obChinaExcel.ReadHttpFile(strTab);
}
//实现报表数据录入提交操作
function SaveData()
{
var strData;
var obChinaExcel=document.getElementById('ChinaExcel');
strData = obChinaExcel.ExportSaveDBData();
document.form1.txtSaveData.value = strData;
if (document.form1.txtSaveData.value=="")
{
alert("ExportSaveDBData输出为空");
}
else
{
alert(document.form1.txtSaveData.value);
document.form1.submit();
}
}
//实现计算
function Calculate()
{
var obChinaExcel=document.getElementById('ChinaExcel');
obChinaExcel.DesignMode = false;
obChinaExcel.ReCalculate();
// obChinaExcel.FormProtect = true;
}
//页面加载显示报表
function OnLoad(strTab)
{
SetInit(strTab);
Calculate();
}
//实现报表自定义向导
function Wizard()
{
var obChinaExcel=document.getElementById('ChinaExcel');
obChinaExcel.UserFunctionGuide();
}
//返回最近一次计算之前的状态
function retDesgin()
{
var obChinaExcel=document.getElementById('ChinaExcel');
obChinaExcel.RestoreAfterCalculate();
}
//关于打印设置
function PrintSetup()
{
var obChinaExcel=document.getElementById('ChinaExcel');
obChinaExcel.OnPrintSetup();
}
//打印页面设置
function PrintpaperSet() {
var obChinaExcel = document.getElementById('ChinaExcel');
obChinaExcel.OnPrintPaperSet();
}
function FileSave() {
var obChinaExcel = document.getElementById('ChinaExcel');
obChinaExcel.OnFileSave();
}
//单元斜线设置
function SlashSet() {
var obChinaExcel = document.getElementById('ChinaExcel');
obChinaExcel.OnSlashSet();
}
//打印文档
function FilePrint()
{
var obChinaExcel=document.getElementById('ChinaExcel');
obChinaExcel.OnFilePrint();
}
//打印预览
function Preview()
{
var obChinaExcel=document.getElementById('ChinaExcel');
obChinaExcel.OnFilePrintPreview();
}
//输出
function onFileSave()
{
var obChinaExcel=document.getElementById('ChinaExcel');
obChinaExcel.onFileSave();
}
// 剪切
function onCut() {
var obChinaExcel = document.getElementById('ChinaExcel');
obChinaExcel.OnCut();
}
//复制
function onPaste() {
var obChinaExcel = document.getElementById('ChinaExcel');
obChinaExcel.OnPaste();
}
// 粘贴
function onCopy() {
var obChinaExcel = document.getElementById('ChinaExcel');
obChinaExcel.OnCopy();
}
//货币符号
function onCurrency() {
}
//设置单元样式
function OnSetCellShowStyle() {
var obChinaExcel = document.getElementById('ChinaExcel');
obChinaExcel.OnSetCellShowStyle();
}
//设置每页打印的行数
function OnSetOnePrintPageDetailZoneRows() {
var obChinaExcel = document.getElementById('ChinaExcel');
nPageRows = obChinaExcel.GetOnePrintPageDetailZoneRows()
nRow = InputBox( "说明:打印时每页显示的行数,不包括表头和表尾页脚、页前脚的行数(如果为0行,则表示没有设置每页打印的行数,系统按缺省进行分页)。 请输入每页打印的行数:", "设置每页打印的行数", nPageRows )
if( nRow != "")
{
obChinaExcel.SetOnePrintPageDetailZoneRows = nRow;
}
}
//帮助
function Help()
{
var obChinaExcel=document.getElementById('ChinaExcel');
obChinaExcel.AboutBox();
}
//设置单元背景色
function onSetCellBkColor()
{
var obChinaExcel = document.getElementById('ChinaExcel');
obChinaExcel.OnSetCellBkColor();
}
//保存报表
function onReportSave(reportId, reportName, ProjectId) {
obChinaExcel=document.getElementById('ChinaExcel');
var tabFile = obChinaExcel.SaveDataAsZipText();
var sendData = "reportId=" + reportId;
sendData += "&tabContent=" + encodeURIComponent(tabFile); //二进制需encodeURIComponent编码
sendData += "&reportName=" + reportName;
sendData += "&projectId=" + ProjectId;
req = Ajax();
req.onreadystatechange = myDeal;
req.open("POST", "SaveTabFile.aspx", "false");
req.setRequestHeader("content-length", sendData.length);
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
req.send(sendData); //要POST的数据
obChinaExcel.SetModifiedFlag(false); //设置表格修改标识
}
function Ajax() {
if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
} else if (window.ActiveXObject) {
try {
req = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e1) {
try {
req = new ActiveXObject("MSXML2.XMLHTTP");
} catch (e2) {
try {
req = new ActiveXObject("MSXML3.XMLHTTP");
} catch (e3) {
alert("创建Ajax失败:" + e3);
}
}
}
} else {
alert("未能识别的浏览器");
}
return req;
}
function myDeal() {
if (req.readyState == 4) {
var ret = req.responseText;
if (ret != "") {
alert(ret);
}
}
}
function onFileOpen() {
var obChinaExcel = document.getElementById('ChinaExcel');
obChinaExcel.OnFileOpen();
}
// 设置单元格的值
function SetCellValue() {
var obChinaExcel = document.getElementById('ChinaExcel');
obChinaExcel.SetCellValue(1, 1, '您好');
obChinaExcel.Refresh();
}
// 给报表里设置的变量传值(变量命名规则:V_Name为变量名,如第一个变量为:V_Name1,第二个为V_Name2,以此类推)
function SetCellValUseVarName(varValue) {
var value = varValue.split("|");
var obChinaExcel = document.getElementById('ChinaExcel');
for (i = 0; i < value.length; i++) {
if (value[i] == 'NULL') {
obChinaExcel.SetCellValUseVarName('V_Name' + (parseInt(i) + 1), '');
}
else {
obChinaExcel.SetCellValUseVarName('V_Name' + (parseInt(i) + 1), value[i]);
}
}
obChinaExcel.ReCalculate();
obChinaExcel.Refresh();
}
// 替换数据源里的参数(相当于给参数传值)
function ReplaceParameter(replaceParameter) {
var obChinaExcel = document.getElementById('ChinaExcel');
var parameterValue = replaceParameter.split("|");
if (parameterValue.length > 1) {
for (i = 0; i < parameterValue.length; i++) {
if (parameterValue[i] == 'NULL') {
obChinaExcel.ReplaceStatScript("${参数" + (i + 1) + "}", "NULL", 1);
}
else {
obChinaExcel.ReplaceStatScript("${参数" + (i + 1) + "}", "'" + parameterValue[i] + "'", 1);
}
}
}
else {
obChinaExcel.ReplaceStatScript("${参数1}", "'" + replaceParameter + "'", 1);
}
}
//function ReplaceParameter(replaceParameter) {
// var obChinaExcel = document.getElementById('ChinaExcel');
// obChinaExcel.ReplaceStatScript("${参数1}", replaceParameter, 1);
//}
//计算报表
function CalculateTab(str) //计算报表
{
//ReplaceParameter(strParam1);
//var cmdCalculate=document.getElementById('cmdCalculate');
//GetData();
var obChinaExcel= document.getElementById('ChinaExcel');
//var obChinaExcel= ChinaExcel;
//var obChinaExcel= window.parent.lefttree.document.getElementById('ChinaExcel');
if (obChinaExcel.DesignMode) {
obChinaExcel.SetCanRefresh(false);
obChinaExcel.RestoreAfterCalculate(); //会重新加载计算之前的报表模板,确保可以重新计算
var strStatScript = obChinaExcel.GetStatScript(1);
var dname = new Array(); //数据源名称
var dtype = new Array(); //数据源类型
var dSQL1 = new Array();
var dSQL2 = new Array();
var strData = new Array(); //数据内容
var dcount = 0; //数据源个数
var i, j;
if (strStatScript.length == 0) {
if (window.confirm('该报表没有统计脚本,继续计算请选[Yes],否则选[No]')) {
obChinaExcel.SetOnlyShowTipMessage(true);
obChinaExcel.ReCalculate();
obChinaExcel.SetOnlyShowTipMessage(false);
}
}
else {
var strQueryParameter = strQueryParameterUrl();
for (i = 1; i < strStatScript.length; i++)//把统计脚本中的数据源类型、名称等存入数组
{
dtype[i] = strStatScript.substring(strStatScript.indexOf("<cmd>") + ("<cmd>").length, strStatScript.indexOf("</cmd>")); //数据条数
dname[i] = strStatScript.substring(strStatScript.indexOf("<dname>") + ("<dname>").length, strStatScript.indexOf("</dname>")); //字段个数
dSQL1[i] = strStatScript.substring(strStatScript.indexOf("<sql>") + ("<sql>").length, strStatScript.indexOf("</sql>"));
if (dtype[i] == 2)//主从报表有第二条SQL
{
dSQL2[i] = strStatScript.substring(strStatScript.indexOf("<sql2>") + ("<sql2>").length, strStatScript.indexOf("</sql2>"));
}
strStatScript = strStatScript.substr(strStatScript.indexOf("</data>") + ("</data>").length);
if (strStatScript.indexOf("<cmd>") < 0) {
dcount = i;
break;
}
}
var url;
for (i = 1; i <= dcount; i++)//根据数据源名重新设置取数方式
{
strData[i] = "";
//by ps 2011-8-16 没有变参
if (dSQL1[i].indexOf("${") == -1 && dSQL1[i].indexOf("${") == -1) {
url = "CalculateChinaEx.aspx?func=GetSqlResult&dtype=" + dtype[i] + "&sql=" + encodeURIComponent(dSQL1[i]) + "&sql2=" + encodeURIComponent(dSQL2[i]) + "&reportId=" + str;
} else {
url = "CalculateChinaEx.aspx?func=GetSqlResult&dtype=" + dtype[i] + "&sql=" + encodeURIComponent(dSQL1[i]) + "&sql2=" + encodeURIComponent(dSQL2[i]) + "&reportId=" + str + strQueryParameter;
}
obChinaExcel.SetStatDataSource1(url, 2, dname[i]);
}
obChinaExcel.SetOnlyShowTipMessage(true);
obChinaExcel.ReCalculate();
obChinaExcel.SetOnlyShowTipMessage(false);
}
obChinaExcel.SetCanRefresh(true);
obChinaExcel.Refresh();
}
}
function CalculateTabPaging(str, str2) //计算报表
{
var obChinaExcel = document.getElementById('ChinaExcel');
obChinaExcel.SetCanRefresh(false);
var pagesize = null;
if (str2 == "库存查询每页显示固定行") {
pagesize = document.getElementById("Text3").value;
}
else {
pagesize = 20;
}
var pageIndex = document.getElementById("cpage").value;
obChinaExcel.RestoreAfterCalculate(); //会重新加载计算之前的报表模板,确保可以重新计算
var strStatScript = obChinaExcel.GetStatScript(1);
//alert(strStatScript);
var dname = new Array(); //数据源名称
var dtype = new Array(); //数据源类型
var dSQL1 = new Array();
var dSQL2 = new Array();
var strData = new Array(); //数据内容
var dcount = 0; //数据源个数
var i, j;
if (strStatScript.length == 0) {
if (window.confirm('该报表没有统计脚本,继续计算请选[Yes],否则选[No]')) {
obChinaExcel.SetOnlyShowTipMessage(true);
obChinaExcel.ReCalculate();
obChinaExcel.SetOnlyShowTipMessage(false);
}
}
else {
var strQueryParameter = strQueryParameterUrl();
for (i = 1; i < strStatScript.length; i++)//把统计脚本中的数据源类型、名称等存入数组
{
dtype[i] = strStatScript.substring(strStatScript.indexOf("<cmd>") + ("<cmd>").length, strStatScript.indexOf("</cmd>")); //数据条数
dname[i] = strStatScript.substring(strStatScript.indexOf("<dname>") + ("<dname>").length, strStatScript.indexOf("</dname>")); //字段个数
dSQL1[i] = strStatScript.substring(strStatScript.indexOf("<sql>") + ("<sql>").length, strStatScript.indexOf("</sql>"));
if (dtype[i] == 2)//主从报表有第二条SQL
{
dSQL2[i] = strStatScript.substring(strStatScript.indexOf("<sql2>") + ("<sql2>").length, strStatScript.indexOf("</sql2>"));
}
strStatScript = strStatScript.substr(strStatScript.indexOf("</data>") + ("</data>").length);
if (strStatScript.indexOf("<cmd>") < 0) {
dcount = i;
break;
}
}
var url;
for (i = 1; i <= dcount; i++)//根据数据源名重新设置取数方式
{
strData[i] = "";
//没有变参
if (dSQL1[i].indexOf("${") == -1 && dSQL1[i].indexOf("${") == -1) {
url = "CalculateChinaExPaging.aspx?func=GetSqlResult&dtype=" + dtype[i] + "&sql=" + encodeURIComponent(dSQL1[i]) + "&sql2=" + encodeURIComponent(dSQL2[i]) + "&pageSize=" + pagesize + "&pageIndex=" + pageIndex + "&nodeid=" + str;
} else {
url = "CalculateChinaExPaging.aspx?func=GetSqlResult&dtype=" + dtype[i] + "&sql=" + encodeURIComponent(dSQL1[i]) + "&sql2=" + encodeURIComponent(dSQL2[i]) + "&pageSize=" + pagesize + "&pageIndex=" + pageIndex + "&nodeid=" + str + strQueryParameter;
}
obChinaExcel.SetStatDataSource1(url, 2, dname[i]);
}
obChinaExcel.SetOnlyShowTipMessage(true);
obChinaExcel.ReCalculate();
obChinaExcel.SetOnlyShowTipMessage(false);
}
obChinaExcel.SetCanRefresh(true);
obChinaExcel.Refresh();
}
function strQueryParameterUrl() {
var i, j, nCount, bSameName;
var strTempA = "";
var strTempB = "";
var dParam = new Array(); //变参数组
nCount = 0;
var obChinaExcel = document.getElementById('ChinaExcel');
for (i = 1; i <= obChinaExcel.GetMaxRow(); i++) {
for (j = 1; j <= obChinaExcel.GetMaxCol(); j++) {
strTempA = obChinaExcel.GetCellQueryParameter(i, j);
if (strTempA != "") {
bSameName = false;
for (k = 1; k <= nCount; k++) {
if (dParam[k] == strTempA) {
bSameName = true;
break;
}
}
if (bSameName == false) {
nCount++;
dParam[nCount] = strTempA;
}
}
}
}
for (k = 1; k <= nCount; k++) {
strTempB = strTempB + "&" + encodeURIComponent(dParam[k]) + "=" + "${" + dParam[k] + "}";
}
return strTempB;
}
// 自定义字段(指数据源字段)
function DefineField(strFieldName,strFieldName1) {
var obChinaExcel = document.getElementById('ChinaExcel');
var strFieldDefine;
strFieldDefine = "<data><cmd>6</cmd><stattype>1</stattype><type>2</type><fieldname>" + strFieldName + "</fieldname><insertflag>0</insertflag><showcontent>1</showcontent></data>";
obChinaExcel.SetCellStatDefine(obChinaExcel.Row, obChinaExcel.Col, strFieldDefine);
// strFieldDefine = "<data><cmd>6</cmd><stattype>1</stattype><type>2</type><fieldname>" + strFieldName1 + "</fieldname><insertflag>0</insertflag><showcontent>1</showcontent></data>";
// obChinaExcel.SetCellStatDefine(obChinaExcel.Row, obChinaExcel.Col+1, strFieldDefine);
obChinaExcel.Refresh();
}
function onCbClickEvent(obj, fNoEvent) {
if (null != event) {
event.cancelBubble = true;
}
// Regular push button
onCbClick(obj.id, true);
return (false);
}
function onCbClick(szCommand, fState) {
//开始命令
switch (szCommand.toUpperCase()) {
case "CMDFILENEW": //新建
mnuFileNew_click();
break;
case "CMDFILEOPEN": //打开文件
mnuFileOpen_click();
break;
case "CMDEXCELFILEOPEN": //打开EXCEL文件
mnuExcelFileOpen_click();
break;
case "CMDWEBFILEOPEN": //打开远程文件
mnuFileWebOpen_click();
break;
case "CMDWEBXMLFILEOPEN": //打开远程XML文件
mnuXMLFileWebOpen_click();
break;
case "CMDSAVEDATAASSTRING": //输出为字符串
mnuSaveDataAsString_click();
break;
case "CMDFILESAVE": //保存文档
SaveTabFile1(); //保存到服务器 tcf
break;
case "CMDFILESAVEAS": //另存为
mnuFileSaveAs_click();
break;
case "CMDFILEPRINTPAPERSET": //打印页设置文档
mnuPrintPaperSet_click();
break;
case "CMDFILEPRINTSETUP": //打印设置文档
mnuFilePrintSetup_click();
break;
case "CMDFILEPRINT": //打印文档
mnuFilePrint_click();
break;
case "CMDFILEPRINTPREVIEW": //打印预览文档
mnuFilePrintPreview_click();
break;
case "CMDEDITCUT": //剪切
ChinaExcel.OnCut();
//mnuEditCut_click();
break;
case "CMDEDITCOPY": //复制
ChinaExcel.OnCopy();
//mnuEditCopy_click();
break;
case "CMDEDITPASTE": //粘贴
ChinaExcel.OnPaste();
//mnuEditPaste_click();
break;
case "CMDEDITFIND": //查找替换
mnuEditFind_click();
break;
case "CMDEDITUNDO": //撤消
//mnuEditUndo_click();
break;
case "CMDEDITREDO": //重做
//mnuEditRedo_click();
break;
case "CMDSHAPE3D": //设置单元3维显示
mnuShape3D_click();
break;
case "CMDROWLABEL": //设置行表头
mnuRowLabel_click();
break;
case "CMDCOLLABEL": //设置列表头
mnuColLabel_click();
break;
case "CMDSTATWIZARD": //
ChinaExcel.OnStatWebWizard();
break;
case "CMDSORTDESCENDING": //降序排序
cmdSortDescending_click();
break;
case "CMDFUNCTIONLIST": //函数列表
mnuFunctionList_click();
break;
case "CMDUSERFUNCTIONGUIDE": //自定义函数向导
mnuUserFunctionGuide_click();
break;
case "CMDFORMULASUMH": //水平求和
cmdFormulaSumH_click();
break;
case "CMDFORMULASUMV": //垂直求和
cmdFormulaSumV_click();
break;
case "CMDFORMULASUMHV": //双向求和
cmdFormulaSumHV_click();
break;
case "CMDCHARTWZD": //图表向导
mnuDataWzdChart_click();
break;
case "CMDINSERTPIC": //插入图片
mnuFormatInsertPic_click();
break;
case "CMDINSERTCELLPIC": //插入单元图片
mnuFormatInsertCellPic_click();
break;
case "CMDHYPERLINK": //超级链接
mnuEditHyperlink_click();
break;
case "CMDFINANCEHEADERTYPE": //财务表头
mnuFinanceHeader_click();
break;
case "CMDFINANCETYPE": //财务表览
mnuFinance_click();
break;
case "CMDSHOWGRIDLINE": //显示/隐藏背景表格线
with (ChinaExcel) {
ShowGrid = !ShowGrid;
}
break;
case "CMDSHOWHEADER": //显示/隐藏系统表头
with (ChinaExcel) {
ShowHeader = !ShowHeader;
}
break;
//***********************************************************
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
case "CMDBOLD": //设置粗体
cmdBold_click();
break;
case "CMDITALIC": //设置斜体
cmdItalic_click();
break;
case "CMDUNDERLINE": //设置下划线
cmdUnderline_click();
break;
case "CMDBACKCOLOR": //设置背景色
cmdBackColor_click();
break;
case "CMDFORECOLOR": //设置前景色
cmdForeColor_click();
break;
case "CMDWORDWRAP": //设置自动折行
cmdWordWrap_click();
break;
case "CMDALIGNLEFT": //左对齐
cmdAlignLeft_click();
break;
case "CMDALIGNCENTER": //居中对齐
cmdAlignCenter_click();
break;
case "CMDALIGNRIGHT": //居右对齐
cmdAlignRight_click();
break;
case "CMDALIGNTOP": //居上对齐
cmdAlignTop_click();
break;
case "CMDALIGNMIDDLE": //垂直居中对齐
cmdAlignMiddle_click();
break;
case "CMDALIGNBOTTOM": //居下对齐
cmdAlignBottom_click();
break;
case "CMDDRAWBORDER": //画框线
cmdDrawBorder_click();
break;
case "CMDERASEBORDER": //抹框线
cmdEraseBorder_click();
break;
case "CMDCURRENCY": //货币符号
cmdCurrency_click();
break;
case "CMDPERCENT": //百分号
cmdPercent_click();
break;
case "CMDTHOUSAND": //千分位
cmdThousand_click();
break;
case "CMDABOUT": //关于超级报表插件
cmdAbout_click();
break;
//***********************************************************
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
case "CMDINSERTCOL": //插入列
cmdInsertCol_click();
break;
case "CMDINSERTROW": //插入行
cmdInsertRow_click();
break;
case "CMDINSERTCELL": //插入单元
cmdInsertCell_click();
break;
case "CMDDELETECELL": //删除单元
cmdDeleteCell_click();
break;
case "CMDDELETECOL": //删除列
cmdDeleteCol_click();
break;
case "CMDDELETEROW": //删除行
cmdDeleteRow_click();
break;
case "CMDMAXROWCOL": //设置表格行列数
mnuMaxRowCol_click();
break;
case "CMDMERGECELL": //合并单元格
mnuFormatMergeCell_click();
break;
case "CMDUNMERGECELL": //取消合并单元格
mnuFormatUnMergeCell_click();
break;
case "CMDMERGEROW": //行组合
cmdMergeRow_click();
break;
case "CMDMERGECOL": //列组合
cmdMergeCol_click();
break;
case "CMDRECALCALL": //重算全表
mnuFormulaReCalc_click();
break;
case "CMDFORMPROTECT": //整表保护
mnuFormProtect_click();
break;
case "CMDREADONLY": //单元格只读
mnuReadOnly_click();
break;
case "SETONEPRINTPAGEDETAILZONEROWS": //设置每页打印的行数
mnuSetOnePrintPageDetailZoneRows_click();
break;
}
}
@@ -0,0 +1,15 @@
// JScript 文件
/*
//实现报表的设计
//Date:2007/4/1
*/
var str = '';
str+="<object classid=\"CLSID:15261F9B-22CC-4692-9089-0C40ACBDFDD8\""
str+="CODEBASE='http://www.soft198.com/downloads/chinaexcelweb.cab#version=3,8,9,2' name=\"ChinaExcel\" id=\"ChinaExcel\""
str+="style=\"left: 0px; top: 0px; width: 100%; height: 98%\">";
str+="<param name=\"_Version\" value=\"65536\">";
str+="<param name=\"_ExtentX\" value=\"20505\">";
str+="<param name=\"_ExtentY\" value=\"14155\">";
str+="<param name=\"_StockProps\" value=\"0\">";
str+="</OBJECT>";
document.write(str);
@@ -0,0 +1,334 @@
Public Sub mnuFileNew_click()
If ChinaExcel.IsModified() Then '文档已经被更改
rtn = MsgBox( "文档已被更改,是否保存?", vbExclamation Or vbYesNoCancel)
If rtn = vbYes Then
mnuFileSave_click
ElseIf rtn = vbCancel Then
Exit Sub
End If
End If
ChinaExcel.SetMaxRows(0)
ChinaExcel.SetMaxRows(18)
ChinaExcel.SetMaxCols(8)
ChinaExcel.FormProtect = false
'menu_init
End Sub
'超级链接
Public Sub mnuEditHyperlink_click()
strUrl = InputBox( "请输入超级链接地址:", "超级链接", "HTTP://" )
ChinaExcel.SetCellURLType ChinaExcel.Row,ChinaExcel.Col,strUrl
End Sub
'设置粗体
Public Sub cmdBold_click()
ChinaExcel.Bold = not ChinaExcel.Bold
End Sub
'设置斜体
Public Sub cmdItalic_click()
ChinaExcel.Italic = not ChinaExcel.Italic
End Sub
'设置下划线
Public Sub cmdUnderline_click()
ChinaExcel.Underline = not ChinaExcel.Underline
End Sub
'设置背景色
Public Sub cmdBackColor_click()
ChinaExcel.OnSetCellBkColor
End Sub
'设置前景色
Public Sub cmdForeColor_click()
ChinaExcel.OnSetTextColor
End Sub
'自动折行
Public Sub cmdWordWrap_click()
ChinaExcel.AutoWrap = not ChinaExcel.AutoWrap
nMenuID = MenuOcx.GetMenuID("AutoWrap")
MenuOcx.SetMenuChecked nMenuID,ChinaExcel.AutoWrap
End Sub
'居左对齐
Public Sub cmdAlignLeft_click()
ChinaExcel.HorzTextAlign = 1
End Sub
'居中对齐
Public Sub cmdAlignCenter_click()
ChinaExcel.HorzTextAlign = 2
End Sub
'居右对齐
Public Sub cmdAlignRight_click()
ChinaExcel.HorzTextAlign = 3
End Sub
'居上对齐
Public Sub cmdAlignTop_click()
ChinaExcel.VertTextAlign = 1
End Sub
'垂直居中对齐
Public Sub cmdAlignMiddle_click()
ChinaExcel.VertTextAlign = 2
End Sub
'居下对齐
Public Sub cmdAlignBottom_click()
ChinaExcel.VertTextAlign = 3
End Sub
'画边框线
Public Sub cmdDrawBorder_click()
With ChinaExcel
.GetSelectRegionWeb StartRow, StartCol, EndRow, EndCol
.DrawCellBorder StartRow, StartCol, EndRow, EndCol, BorderTypeSelect.value, 0,0
End With
End Sub
'抹框线
Public Sub cmdEraseBorder_click()
With ChinaExcel
.GetSelectRegionWeb StartRow, StartCol, EndRow, EndCol
.ClearCellBorder StartRow, StartCol, EndRow, EndCol,0
End With
End Sub
'货币符号
Public Sub cmdCurrency_click()
With ChinaExcel
.GetSelectRegionWeb StartRow, StartCol, EndRow, EndCol
.SetCellDigitShowStyle StartRow, StartCol, EndRow, EndCol,2,2
End With
End Sub
'百分号
Public Sub cmdPercent_click()
With ChinaExcel
.GetSelectRegionWeb StartRow, StartCol, EndRow, EndCol
.SetCellDigitShowStyle StartRow, StartCol, EndRow, EndCol,4,2
End With
End Sub
'千分位
Public Sub cmdThousand_click()
With ChinaExcel
.GetSelectRegionWeb StartRow, StartCol, EndRow, EndCol
.SetCellDigitShowStyle StartRow, StartCol, EndRow, EndCol,5,2
End With
End Sub
'关于超级报表插件
Public Sub cmdAbout_click()
ChinaExcel.AboutBox
End Sub
'插入列
Public Sub cmdInsertCol_click()
ChinaExcel.OnInsertBeforeCol
End Sub
'插入行
Public Sub cmdInsertRow_click()
ChinaExcel.OnInsertBeforeRow
End Sub
'插入单元
Public Sub cmdInsertCell_click()
ChinaExcel.OnInsertCell
End Sub
'删除单元
Public Sub cmdDeleteCell_click()
ChinaExcel.OnDeleteCell
End Sub
'删除列
Public Sub cmdDeleteCol_click()
ChinaExcel.OnDeleteCol
End Sub
'删除行
Public Sub cmdDeleteRow_click()
ChinaExcel.OnDeleteRow
End Sub
'水平求和
Public Sub cmdFormulaSumH_click()
With ChinaExcel
StartCol = 0: StartRow = 0: EndCol = 0: EndRow = 0
.GetSelectRegionWeb StartRow,StartCol,EndRow,EndCol
.AutoSum StartRow,StartCol,EndRow,EndCol,2
End With
End Sub
'垂直求和
Public Function InStrL(inString, srchString)
'此函数用于查询srchString子字串在父字串inString中的最后一个位置
If srchString = "" Then
InStrL = 0
Exit Function
End If
If Len(srchString) Then
Do
iLastPos = iCurPos
iCurPos = InStr(iCurPos + 1, inString, srchString, vbTextCompare)
Loop Until iCurPos = 0
End If
InStrL = iLastPos
End Function
Public Function StrGetSinglePara(ByVal strCellPara, ByVal strCharacter)
'传入单元参数strCellPara和特征字串strCharacter,函数可返回特征字串中的字符串值
strChar1 = "<" & Trim(strCharacter) & ">"
strChar2 = "</" & Trim(strCharacter) & ">"
iStart = InStrL(strCellPara, strChar1)
iEnd = InStrL(strCellPara, strChar2)
If iStart > 0 And iEnd > iStart Then
iCharacterLen = Len(Trim(strCharacter)) + 2
iStart = iStart + iCharacterLen
StrGetSinglePara = Trim(Mid(strCellPara, iStart, iEnd - iStart))
Else
StrGetSinglePara = ""
End If
End Function
Public Function GetCellDefineValue(ByVal nRow,ByVal nCol)
strCellPara = ChinaExcel.GetCellStatDefine(nRow, nCol)
If Trim(strCellPara) <> "" Then
strFldName = StrGetSinglePara(strCellPara, "fieldname")
else
strFldName=""
end if
GetCellDefineValue=strFldName
End Function
Public Function GetCellColName(nRow, nCol)
strName = ChinaExcel.GetCellName(nRow,nCol)
strNameA=""
for iCount=1 to Len(strName)
If Not IsNumeric(Mid(strName,iCount, 1)) Then
strNameA = strNameA & Mid(strName,iCount, 1)
else
exit for
End If
next
GetCellColName = strNameA
End Function
Public Sub cmdFormulaSumV_click()
With ChinaExcel
' StartCol = 0: StartRow = 0: EndCol = 0: EndRow = 0
' .GetSelectRegionWeb StartRow,StartCol,EndRow,EndCol
' .AutoSum StartRow,StartCol,EndRow,EndCol,1
nRow=.Row
nCol=.Col
'使用字段进行求和
' strValue=GetCellDefineValue(nRow,nCol)
' if strValue="" then
' msgbox "没有找到定义的字段名"
' exit sub
' end if
' .SetCellShowVal nRow+1,nCol,"=sum(@"+strValue+")"
'使用公式求和
strValue=GetCellDefineValue(nRow,nCol)
if strValue="" then
msgbox "没有找到定义的字段名"
exit sub
end if
strValueA=GetCellColName(nRow,nCol)
if strValueA="" then
msgbox "获取列名错误"
exit sub
end if
qs=msgbox("列名求和选[YES],字段名求和选[NO]",vbYesNo + vbQuestion,"询问")
if qs=vbyes then
.SetCellShowVal nRow+1,nCol,"=sum(" & strValueA & nRow & ":" & strValueA & "0)"
else
.SetCellShowVal nRow+1,nCol,"=sum(@" & strValue & ")"
end if
End With
End Sub
'双向求和
Public Sub cmdFormulaSumHV_click()
With ChinaExcel
StartCol = 0: StartRow = 0: EndCol = 0: EndRow = 0
.GetSelectRegionWeb StartRow,StartCol,EndRow,EndCol
.AutoSum StartRow,StartCol,EndRow,EndCol,3
End With
End Sub
'图表向导
Public Sub mnuDataWzdChart_click()
ChinaExcel.OnChartWizard
End Sub
'设置图片为原始大小
Public Sub mnuSetCellImageOriginalSize_click()
With ChinaExcel
.GetSelectRegionWeb StartRow, StartCol, EndRow, EndCol
for row = StartRow to EndRow
for col = StartCol to EndCol
.SetCellImageSize row,col,1
next
next
.Refresh
End With
End Sub
'设置图片为单元大小
Public Sub mnuSetCellImageCellSize_click()
With ChinaExcel
.GetSelectRegionWeb StartRow, StartCol, EndRow, EndCol
for row = StartRow to EndRow
for col = StartCol to EndCol
.SetCellImageSize row,col,0
next
next
.Refresh
End With
End Sub
'删除图片
Public Sub mnuDeleteCellImage_click()
ChinaExcel.GetSelectRegionWeb StartRow, StartCol, EndRow, EndCol
ChinaExcel.DeleteCellImage StartRow, StartCol, EndRow, EndCol
End Sub
'设置每页打印的行数
Public Sub mnuSetOnePrintPageDetailZoneRows_click()
nPageRows = ChinaExcel.GetOnePrintPageDetailZoneRows()
nRow = InputBox( "说明:打印时每页显示的行数,不包括表头和表尾页脚、页前脚的行数(如果为0行,则表示没有设置每页打印的行数,系统按缺省进行分页)。 请输入每页打印的行数:", "设置每页打印的行数", nPageRows )
If nRow <> "" Then ChinaExcel.SetOnePrintPageDetailZoneRows nRow
End Sub
'*****************************************************************
'********** 下拉列表框中的事件
'*****************************************************************
'设置字体
Public Sub changeFontName( ByVal value )
With ChinaExcel
lFontName = value
.CellFontName = lFontName
End With
End Sub
'设置字号
Public Sub changeFontSize( ByVal value )
With ChinaExcel
lFontSize = value
.CellFontSize = lFontSize
End With
End Sub
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB