Example #1
0
		/// <summary>
		/// Конструктор
		/// </summary>
		/// <param name="pOwner"></param>
		/// <param name="pParent"></param>
		/// <param name="pTopRow"></param>
		public XLRDetails(CXLRDataSet pOwner, CXLRGroup pParent, int pTopRow):base(pOwner, pParent, 0){
			this.FTopRow = pTopRow;
			this._detailRows = new ArrayList();
			if(this.RootGroup.FirstDetalsRow == -1){
				this.RootGroup.FirstDetalsRow = this.TopRow;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		/// <param name="pOwner"></param>
		/// <param name="cfg"></param>
		public XLRDataSource(CXLReport pOwner, CXLReportDSConfig cfg){
			this._owner = pOwner;
      this._cfg = cfg;

      this._ds = new CXLRDataSet(this);
      this._ds.OnProgress += this._doOnProgressDataSet;
    }
Example #3
0
    public CXLRootGroup(CXLRDataSet pOwner, Excel.Range pDSRange) : base(pOwner, null, 0) {
      this.GRTTmplDef = new CXLRTemplateDef(pDSRange);
      try {
        this.FHeaderFormatsCount = this.GRTTmplDef.HeaderFormats.Count;
        this.FLeftColOffset = pDSRange.Column;
        this.FTopRowOffset = pDSRange.Row;
        this.FColDefs = new CXLRColDefs();
        this.FLeftCol = 1;
        this.FTopRow = 1;
        this.parsColumns();
        this.GRTTmplDef.Check(this);
        if (this.ColDefs.HasTotals)
          this.FTotals = new CXLRTotals(this);
        this.FGroupFieldNamesComma = this.getGroupFieldNamesComma();

      } finally {
        this.GRTTmplDef.Dispose();
        this.GRTTmplDef = null;
      }
		}
Example #4
0
    public CXLRGroup(CXLRDataSet pOwner, CXLRGroup pParent, int pGrpIndex) {
			this.FGrpIndex = pGrpIndex;
			this.FOwner = pOwner;
			this.FParentGroup = pParent;
			if(this.ParentGroup != null){
				this.FOnParentRowsInsert += new DlgOnParentRowsInsertEvent(this.ParentGroup.DoOnParentRowsInsertEvent);
				if(this.GetType() == typeof(CXLRGroup)){
					this.DoOnRowsInsert(1);
					this.FRowsCount++;
					if(this.ParentGroup.IsRootGroup){
						this.FLeftCol = 2;
					}else{
						this.FLeftCol = this.ParentGroup.LeftCol + 1;
					}
					CXLRGroup vPrevGrp = this.getPrevGroup();
					if(vPrevGrp != null)
						this.FTopRow = vPrevGrp.BottomRow + 1;
					else{
						if(this.ParentGroup.IsRootGroup)
							this.FTopRow = this.ParentGroup.TopRow;
						else
							this.FTopRow = this.ParentGroup.TopRow + 1;
					}
          CXLRColDef vCol = this.RootGroup.ColDefs.GetByColIndex(this.FLeftCol);
          String[] vGrps = vCol.GroupFieldNames;
					this.FGroupKeyField = null;
					if(vGrps.Length > 0)
						this.FGroupKeyField = vGrps[0];
					if(this.RootGroup.ColDefs.HasTotals){
            CXLRColDef vGrpColDef = this.RootGroup.ColDefs[this.FGroupKeyField];
            if((this.FGroupKeyField != null) && (vGrpColDef != null) && (vGrpColDef.GroupFieldHasFooter))
						this.FTotals = new CXLRTotals(this);
					}
				}
			}
		}
Example #5
0
//public
		//constructor
		public CXLRGroups(CXLRDataSet pOwner, CXLRGroup pParent){
			this.FParentGroup = pParent;
			this.FOwner = pOwner;
			this.FGroups = new List<CXLRGroup>();
		}
 protected override void doOnDispose() {
   this._ds.Dispose();
   this._ds = null;
 }
 private void _doOnProgressDataSet(CXLRDataSet sender, Decimal prgPrc){
   if(this.OnProgress != null)
     this.OnProgress(this, prgPrc);
 }