internal void ResetContext(MatrixMember staticOrSubtotal, int newAfterSubtotalCollectionIndex, ShimRenderGroups renderGroups, MatrixMemberInfoCache newMatrixMemberCellIndexes) { int currentAllocationSize = 1; if (m_group != null) { m_group.CurrentRenderGroupIndex = -1; if (renderGroups != null) { m_group.RenderGroups = renderGroups; } currentAllocationSize = m_group.RenderGroups.MatrixMemberCollectionCount; } else if (staticOrSubtotal != null) { m_staticOrSubtotal = staticOrSubtotal; if (m_isAfterSubtotal && newAfterSubtotalCollectionIndex >= 0) { m_renderCollectionIndex = newAfterSubtotalCollectionIndex; } } UpdateMatrixMemberInfoCache(currentAllocationSize, newMatrixMemberCellIndexes); if (IsStatic) { UpdateContext(m_staticOrSubtotal); } else if (!base.OwnerTablix.RenderMatrix.NoRows && m_group.RenderGroups != null && m_group.RenderGroups.Count > 0) { UpdateContext(m_group.RenderGroups[0] as MatrixMember); } }
internal override bool SetNewContext(int index) { base.ResetContext(); if (m_instance != null) { m_instance.SetNewContext(); } if (m_group != null) { if (base.OwnerTablix.RenderMatrix.NoRows) { return(false); } if (index < 0 || index >= m_group.RenderGroups.Count) { return(false); } m_group.CurrentRenderGroupIndex = index; MatrixMember currentRenderGroup = m_group.RenderGroups[index] as MatrixMember; UpdateMatrixMemberInfoCache(m_group.RenderGroups.MatrixMemberCollectionCount, null); UpdateContext(currentRenderGroup); return(true); } return(index <= 1); }
internal ShimMatrixMember(IDefinitionPath parentDefinitionPath, Tablix owner, ShimMatrixMember parent, int parentCollectionIndex, bool isColumn, int renderCollectionIndex, MatrixMember staticOrSubtotal, bool isAfterSubtotal, MatrixMemberInfoCache matrixMemberCellIndexes) : base(parentDefinitionPath, owner, parent, parentCollectionIndex, isColumn) { m_renderCollectionIndex = renderCollectionIndex; m_isAfterSubtotal = isAfterSubtotal; m_currentMatrixMemberCellIndexes = matrixMemberCellIndexes; m_definitionStartIndex = owner.GetCurrentMemberCellDefinitionIndex(); m_staticOrSubtotal = staticOrSubtotal; GenerateInnerHierarchy(owner, parent, isColumn, staticOrSubtotal.Children); m_definitionEndIndex = owner.GetCurrentMemberCellDefinitionIndex(); }
private void UpdateContext(MatrixMember currentRenderGroup) { if (m_header != null) { m_header.ResetCellContents(); } if (m_children != null) { ((ShimMatrixMemberCollection)m_children).ResetContext(currentRenderGroup.Children); } else { ((ShimMatrixRowCollection)base.OwnerTablix.Body.RowCollection).UpdateCells(this); } }
internal void ResetContext(MatrixMemberCollection newRenderMemberCollection, MatrixMemberInfoCache matrixMemberCellIndexes) { if (m_children == null) { return; } MatrixMember staticOrSubtotal = null; int newAfterSubtotalCollectionIndex = -1; ShimRenderGroups renderGroups = null; if (newRenderMemberCollection != null) { renderGroups = new ShimRenderGroups(newRenderMemberCollection, m_subtotalChildIndex == 0, 1 == m_subtotalChildIndex); int count = newRenderMemberCollection.Count; if (m_subtotalChildIndex == 0) { staticOrSubtotal = newRenderMemberCollection[0]; } else if (1 == m_subtotalChildIndex) { staticOrSubtotal = newRenderMemberCollection[count - 1]; newAfterSubtotalCollectionIndex = count - 1; } } if (m_dynamicSubgroupChildIndex >= 0) { ((ShimMatrixMember)m_children[m_dynamicSubgroupChildIndex]).ResetContext(null, -1, renderGroups, matrixMemberCellIndexes); if (m_subtotalChildIndex >= 0) { ((ShimMatrixMember)m_children[m_subtotalChildIndex]).ResetContext(staticOrSubtotal, newAfterSubtotalCollectionIndex, null, matrixMemberCellIndexes); } } else { for (int i = 0; i < m_children.Length; i++) { staticOrSubtotal = newRenderMemberCollection?[i]; ((ShimMatrixMember)m_children[i]).ResetContext(staticOrSubtotal, -1, null, matrixMemberCellIndexes); } } }
public void ResetContext(MatrixMemberCollection newRenderMemberCollection, MatrixMemberInfoCache matrixMemberCellIndexes) { if (base.m_children != null) { MatrixMember staticOrSubtotal = null; int newAfterSubtotalCollectionIndex = -1; ShimRenderGroups renderGroups = null; if (newRenderMemberCollection != null) { renderGroups = new ShimRenderGroups(newRenderMemberCollection, 0 == this.m_subtotalChildIndex, 1 == this.m_subtotalChildIndex); int count = newRenderMemberCollection.Count; if (this.m_subtotalChildIndex == 0) { staticOrSubtotal = newRenderMemberCollection[0]; } else if (1 == this.m_subtotalChildIndex) { staticOrSubtotal = newRenderMemberCollection[count - 1]; newAfterSubtotalCollectionIndex = count - 1; } } if (this.m_dynamicSubgroupChildIndex >= 0) { ((ShimMatrixMember)base.m_children[this.m_dynamicSubgroupChildIndex]).ResetContext(null, -1, renderGroups, matrixMemberCellIndexes); if (this.m_subtotalChildIndex >= 0) { ((ShimMatrixMember)base.m_children[this.m_subtotalChildIndex]).ResetContext(staticOrSubtotal, newAfterSubtotalCollectionIndex, null, matrixMemberCellIndexes); } } else { for (int i = 0; i < base.m_children.Length; i++) { staticOrSubtotal = ((newRenderMemberCollection != null) ? newRenderMemberCollection[i] : null); ((ShimMatrixMember)base.m_children[i]).ResetContext(staticOrSubtotal, -1, null, matrixMemberCellIndexes); } } } }
public ShimMatrixMemberCollection(IDefinitionPath parentDefinitionPath, Tablix owner, bool isColumnGroup, ShimMatrixMember parent, MatrixMemberCollection renderMemberCollection, MatrixMemberInfoCache matrixMemberCellIndexes) : base(parentDefinitionPath, owner, isColumnGroup) { this.m_definitionStartIndex = owner.GetCurrentMemberCellDefinitionIndex(); int count = renderMemberCollection.Count; if (renderMemberCollection[0].IsStatic) { base.m_children = new ShimMatrixMember[count]; for (int i = 0; i < count; i++) { base.m_children[i] = new ShimMatrixMember(this, owner, parent, i, isColumnGroup, i, renderMemberCollection[i], false, matrixMemberCellIndexes); } } else { this.m_dynamicSubgroupChildIndex = 0; bool flag = null != renderMemberCollection.MatrixHeadingDef.Subtotal; bool flag2 = flag && Subtotal.PositionType.After == renderMemberCollection.MatrixHeadingDef.Subtotal.Position; base.m_children = new ShimMatrixMember[(!flag) ? 1 : 2]; if (flag) { this.m_subtotalChildIndex = 0; if (flag2) { this.m_subtotalChildIndex++; } else { this.m_dynamicSubgroupChildIndex++; } } if (flag) { MatrixMember matrixMember = renderMemberCollection[this.m_subtotalChildIndex]; AspNetCore.ReportingServices.ReportRendering.ReportItem reportItem = matrixMember.ReportItem; if (reportItem != null) { if (isColumnGroup) { this.m_sizeDelta += reportItem.Width.ToMillimeters(); } else { this.m_sizeDelta += reportItem.Height.ToMillimeters(); } } } if (flag && !flag2) { base.m_children[this.m_subtotalChildIndex] = new ShimMatrixMember(this, owner, parent, this.m_subtotalChildIndex, isColumnGroup, 0, renderMemberCollection[0], flag2, matrixMemberCellIndexes); } ShimRenderGroups renderGroups = new ShimRenderGroups(renderMemberCollection, flag && !flag2, flag && flag2); ShimMatrixMember shimMatrixMember = (ShimMatrixMember)(base.m_children[this.m_dynamicSubgroupChildIndex] = new ShimMatrixMember(this, owner, parent, this.m_dynamicSubgroupChildIndex, isColumnGroup, this.m_dynamicSubgroupChildIndex, renderGroups, matrixMemberCellIndexes)); if (flag && flag2) { base.m_children[this.m_subtotalChildIndex] = new ShimMatrixMember(this, owner, parent, this.m_subtotalChildIndex, isColumnGroup, count - 1, renderMemberCollection[count - 1], flag2, matrixMemberCellIndexes); } this.m_sizeDelta += shimMatrixMember.SizeDelta; } this.m_definitionEndIndex = owner.GetCurrentMemberCellDefinitionIndex(); }