/// <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; } }
//public //constructor public CXLRTotals(CXLRGroup pOwner){ FOwner = pOwner; FOwner.DoOnChildRowsInsert(1); FTotals = new List<CXLRTotal>(); for(int i=0; i<this.FOwner.RootGroup.ColDefs.Count; i++){ CXLRColDef vCurCol = this.FOwner.RootGroup.ColDefs[i]; switch(vCurCol.TTLType){ case XLRTTLType.xttRuntotal: this.addTotalRun(vCurCol); break; case XLRTTLType.xttSubtotal: case XLRTTLType.xttFormula: this.addTotalSub(vCurCol); break; } } }
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); } } } }
public CXLRGroup AddGroup() { CXLRGroup newGroup = new CXLRGroup(this.Owner, this.ParentGroup, this.FGroups.Count); this.FGroups.Add(newGroup); return newGroup; }
//public //constructor public CXLRGroups(CXLRDataSet pOwner, CXLRGroup pParent){ this.FParentGroup = pParent; this.FOwner = pOwner; this.FGroups = new List<CXLRGroup>(); }