public void NewOuterCells() { if (0 >= this.m_currentCellInnerIndex && this.m_cells.Count != 0) { return; } Matrix matrix = (Matrix)base.m_reportItemDef; if (matrix.ProcessingInnerGrouping == Pivot.ProcessingInnerGroupings.Column) { MatrixCellInstanceList value = new MatrixCellInstanceList(); this.m_cells.Add(value); } if (0 < this.m_currentCellInnerIndex) { this.m_currentCellOuterIndex++; this.m_currentCellInnerIndex = 0; } }
public MatrixCellInstance AddCell(ReportProcessing.ProcessingContext pc, out NonComputedUniqueNames cellNonComputedUniqueNames) { Matrix matrix = (Matrix)base.m_reportItemDef; int currentCellRIIndex = this.GetCurrentCellRIIndex(); bool flag = matrix.ProcessingInnerGrouping == Pivot.ProcessingInnerGroupings.Column; int num; int colIndex; if (flag) { num = this.m_currentOuterStaticIndex; colIndex = this.m_currentInnerStaticIndex; } else { colIndex = this.m_currentOuterStaticIndex; num = this.m_currentInnerStaticIndex; } MatrixCellInstance matrixCellInstance = null; matrixCellInstance = ((pc.HeadingInstance == null || pc.HeadingInstance.MatrixHeadingDef.Subtotal.StyleClass == null) ? new MatrixCellInstance(num, colIndex, matrix, currentCellRIIndex, pc, out cellNonComputedUniqueNames) : new MatrixSubtotalCellInstance(num, colIndex, matrix, currentCellRIIndex, pc, out cellNonComputedUniqueNames)); if (!flag && this.m_currentCellOuterIndex == 0) { goto IL_009c; } if (flag && this.m_currentCellInnerIndex == 0) { goto IL_009c; } goto IL_0146; IL_0146: if (matrix.ProcessingInnerGrouping == Pivot.ProcessingInnerGroupings.Column) { this.m_cells[this.m_currentCellOuterIndex].Add(matrixCellInstance); } else { if (this.m_currentCellOuterIndex == 0) { Global.Tracer.Assert(this.m_cells.Count == this.m_currentCellInnerIndex); MatrixCellInstanceList value = new MatrixCellInstanceList(); this.m_cells.Add(value); } this.m_cells[this.m_currentCellInnerIndex].Add(matrixCellInstance); } this.m_currentCellInnerIndex++; return(matrixCellInstance); IL_009c: if (!pc.Pagination.IgnoreHeight) { pc.Pagination.AddToCurrentPageHeight(matrix, matrix.MatrixRows[num].HeightValue); } if (!pc.Pagination.IgnorePageBreak && pc.Pagination.CurrentPageHeight >= pc.Pagination.PageHeight && this.m_rowInstances.Count > 1) { pc.Pagination.SetCurrentPageHeight(matrix, 0.0); this.m_extraPagesFilled++; matrix.CurrentPage = this.m_startPage + this.m_extraPagesFilled; this.m_numberOfChildrenOnThisPage = 0; } else { this.m_numberOfChildrenOnThisPage++; } goto IL_0146; }
protected override object SearchChildren(int targetUniqueName, ref NonComputedUniqueNames nonCompNames, ChunkManager.RenderingChunkManager chunkManager) { object obj = null; Matrix matrix = (Matrix)base.ReportItemDef; if (matrix.CornerReportItems.Count > 0) { if (this.m_cornerContent != null) { obj = ((ISearchByUniqueName)this.m_cornerContent).Find(targetUniqueName, ref nonCompNames, chunkManager); if (obj != null) { return(obj); } } else { NonComputedUniqueNames cornerNonComputedNames = ((MatrixInstanceInfo)base.GetInstanceInfo(chunkManager, false)).CornerNonComputedNames; obj = ((ISearchByUniqueName)matrix.CornerReportItems[0]).Find(targetUniqueName, ref cornerNonComputedNames, chunkManager); if (obj != null) { nonCompNames = cornerNonComputedNames; return(obj); } } } obj = ((ISearchByUniqueName)this.m_columnInstances).Find(targetUniqueName, ref nonCompNames, chunkManager); if (obj != null) { return(obj); } obj = ((ISearchByUniqueName)this.m_rowInstances).Find(targetUniqueName, ref nonCompNames, chunkManager); if (obj != null) { return(obj); } int count = this.m_cells.Count; for (int i = 0; i < count; i++) { MatrixCellInstanceList matrixCellInstanceList = this.m_cells[i]; int count2 = matrixCellInstanceList.Count; for (int j = 0; j < count2; j++) { MatrixCellInstance matrixCellInstance = matrixCellInstanceList[j]; MatrixCellInstanceInfo instanceInfo = matrixCellInstance.GetInstanceInfo(chunkManager); int index = instanceInfo.RowIndex * matrix.MatrixColumns.Count + instanceInfo.ColumnIndex; if (matrix.CellReportItems.IsReportItemComputed(index)) { if (matrixCellInstance.Content != null) { obj = ((ISearchByUniqueName)matrixCellInstance.Content).Find(targetUniqueName, ref nonCompNames, chunkManager); if (obj != null) { return(obj); } } } else { NonComputedUniqueNames contentUniqueNames = instanceInfo.ContentUniqueNames; obj = ((ISearchByUniqueName)matrix.CellReportItems[index]).Find(targetUniqueName, ref contentUniqueNames, chunkManager); if (obj != null) { nonCompNames = contentUniqueNames; return(obj); } } } } return(null); }