ESK的个人空间

鞋服行业、系统架构、ERP性能分析、Java技术、工作流、商业智能

  博客园 :: :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

     Dcube又名Dynamicube,它是一款功能超级的报表汇总插件, BS CS 程序都可应用,随意汇总任何字段合计功能,简便灵活.很多鞋服行业软件都在使用它,但它有一个致命的局域性,当查出来的数据超过1w行的时候,性能明显降下来,当超过2w行的时候,整个客户端就感觉是”死”的状态.

下面是一个在网页中使用dcube3的例子:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> New Document </TITLE>
  <META NAME="Generator" CONTENT="EditPlus">
  <META NAME="Author" CONTENT="">
  <META NAME="Keywords" CONTENT="">
  <META NAME="Description" CONTENT="">
  <SCRIPT LANGUAGE="JavaScript">
 
     function test()
  {
    DCube1.style.visibility="visible";
    var DCCT_UNBOUND=99;
    var DCFNone=0;

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> New Document </TITLE>
  <META NAME="Generator" CONTENT="EditPlus">
  <META NAME="Author" CONTENT="">
  <META NAME="Keywords" CONTENT="">
  <META NAME="Description" CONTENT="">
  <SCRIPT LANGUAGE="JavaScript">
 
     function test()
	 {
				DCube1.style.visibility="visible";
				var DCCT_UNBOUND=99;
				var DCFNone=0;
				var DCFSum=1;
				var DCFAverage=2;
				var DCPage=4;
				var DCRow=2;
				var DCColumn=1;
				var DCData=3;
				var thisField;
				var  trCount;
					
				DCube1.DCConnectType = DCCT_UNBOUND;
				DCube1.Fields.DeleteAll();

				//var DCube1 = document.getElementById("Dcube1");
				DCube1.DCConnectType =99;

				var f;
				f = DCube1.Fields.Add("KHMC", "客户名称", DCRow);
				f = DCube1.Fields.Add("SL", "数量",DCData);
				
				/* f = DCube1.Fields.Add("品牌名称", "品牌", 4);
				f.GroupFooterCaption = "合计:";
				f = DCube1.Fields.Add("大类名称", "大类", 4);
				f.GroupFooterCaption = "合计:";
				f = DCube1.Fields.Add("季节名称", "季节", 4);
				f.GroupFooterCaption = "合计:";*/
					
			   DCube1.RefreshData();
			  DCube1.AutoDataRefresh = true;	
					
	 }
	

  </SCRIPT>
	<script for="DCube1" event="FetchData">
			var arrVal=new Array(2);
				arrVal[0]="张三"
				arrVal[1]="50"
			DCube1.AddRowEx(GetVBArray(arrVal));	
			arrVal=new Array(2);
				arrVal[0]="李四"
				arrVal[1]="60"
			DCube1.AddRowEx(GetVBArray(arrVal));
		</script>
  <script language="vbscript">
			Function GetVBArray(arrValue)
			   Dim Temp
				Dim vbArray
				Temp=arrValue.join("&#^&")
				vbArray=Split(Temp,"&#^&")
				GetVBArray = vbArray
			End Function
			
		</script>

	
 </HEAD>

 <BODY>
	<OBJECT id="DCube1" style="position:absolute;WIDTH: 100%; HEIGHT: 100%;VISIBILITY: hidden" codeBase="Dcube3.Cab#version=3.2.1.1177" classid="clsid:6D63F73D-3688-3000-9C0F-00A0C90F29FC" name="DCube1">
			<PARAM NAME="_ExtentX" VALUE="18653"/>
			<PARAM NAME="_ExtentY" VALUE="9499"/>
			<PARAM NAME="DataSource" VALUE=""/>
			<PARAM NAME="RowAlignment" VALUE="0"/>
			<PARAM NAME="ColAlignment" VALUE="0"/>
			<PARAM NAME="RowStyle" VALUE="1"/>
			<PARAM NAME="ColStyle" VALUE="1"/>
			<PARAM NAME="OutlineIconAlignment" VALUE="1"/>
			<PARAM NAME="GridColor" VALUE="12632256"/>
			<PARAM NAME="BackColor" VALUE="16777215"/>
			<PARAM NAME="DCConnect" VALUE=""/>
			<PARAM NAME="DCDatabaseName" VALUE=""/>
			<PARAM NAME="CursorStyle" VALUE="0"/>
			<PARAM NAME="FieldsBackColor" VALUE="8421504"/>
			<PARAM NAME="FieldsForeColor" VALUE="16777215"/>
			<PARAM NAME="HeadingsForeColor" VALUE="0"/>
			<PARAM NAME="HeadingsBackColor" VALUE="16777215"/>
			<PARAM NAME="DCRecordSource" VALUE=""/>
			<PARAM NAME="sBackColor" VALUE="16777215"/>
			<PARAM NAME="TotalsForeColor" VALUE="0"/>
			<PARAM NAME="GridStyle" VALUE="1"/>
			<PARAM NAME="ForeColor" VALUE="0"/>
			<PARAM NAME="AllowFiltering" VALUE="-1"/>
			<PARAM NAME="AllowUserPivotFields" VALUE="-1"/>
			<PARAM NAME="LeftMargin" VALUE="0.75"/>
			<PARAM NAME="RightMargin" VALUE="0.75"/>
			<PARAM NAME="TopMargin" VALUE="0.49"/>
			<PARAM NAME="BottomMargin" VALUE="0.49"/>
			<PARAM NAME="HeaderMargin" VALUE="0.49"/>
			<PARAM NAME="FooterMargin" VALUE="0.49"/>
			<PARAM NAME="FooterCaption" VALUE="- Page &P -"/>
			<PARAM NAME="HeaderCaption" VALUE="DynamiCube"/>
			<PARAM NAME="HeaderJustification" VALUE="1"/>
			<PARAM NAME="FooterJustification" VALUE="1"/>
			<PARAM NAME="ColPageBreak" VALUE="0"/>
			<PARAM NAME="RowPageBreak" VALUE="0"/>
			<PARAM NAME="ColHeadingsOnEveryPage" VALUE="1"/>
			<PARAM NAME="RowHeadingsOnEveryPage" VALUE="0"/>
			<PARAM NAME="DCOptions" VALUE="0"/>
			<PARAM NAME="AutoDataRefresh" VALUE="-1"/>
			<PARAM NAME="PrinterColumnSpacing" VALUE="0.01"/>
			<PARAM NAME="DCConnectType" VALUE="0"/>
			<PARAM NAME="DCQueryTimeOut" VALUE="0"/>
			<PARAM NAME="SQLYearPart" VALUE="datepart('yyyy',<field>)"/>
			<PARAM NAME="SQLQuarterPart" VALUE="datepart('q',<field>)"/>
			<PARAM NAME="SQLMonthPart" VALUE="datepart('m',<field>)"/>
			<PARAM NAME="SQLWeekPart" VALUE="datepart('ww',<field>)"/>
			<PARAM NAME="BorderStyle" VALUE="1"/>
			<PARAM NAME="AllowSplitters" VALUE="-1"/>
			<PARAM NAME="QueryByPass" VALUE="0"/>
			<PARAM NAME="DataPath" VALUE=""/>
			<PARAM NAME="DataNotAvailableCaption" VALUE=""/>
			<PARAM NAME="PageFieldsVisible" VALUE="-1"/>
			<PARAM NAME="CubeBackColor" VALUE="13160660"/>
			<PARAM NAME="GroupFooterType" VALUE="0"/>
			<PARAM NAME="FooterBackColor" VALUE="-1"/>
			<PARAM NAME="FooterForeColor" VALUE="0"/>
			<PARAM NAME="HeaderBackColor" VALUE="-1"/>
			<PARAM NAME="HeaderForeColor" VALUE="0"/>
			<PARAM NAME="FilteredFieldBackColor" VALUE="-1"/>
			<PARAM NAME="FilteredFieldForeColor" VALUE="16777215"/>
			<PARAM NAME="MousePointer" VALUE="0"/>
			<PARAM NAME="LoadProgressNotifyDelay" VALUE="1000"/>
			<PARAM NAME="IncludeColorsInPrintout" VALUE="-1"/>
		</OBJECT>

	  <input type='button' value='注册' onclick="test()"/>
 </BODY>
</HTML>
posted on 2011-06-02 08:31  ESK  阅读(2441)  评论(0编辑  收藏