internal void UpdateCells(ShimMatrixMember innermostMember)
 {
     if (innermostMember == null || innermostMember.Children != null)
     {
         return;
     }
     if (!innermostMember.IsColumn)
     {
         int memberCellIndex = innermostMember.MemberCellIndex;
         int count           = m_rows[memberCellIndex].Count;
         for (int i = 0; i < count; i++)
         {
             ((ShimMatrixCell)m_rows[memberCellIndex][i]).ResetCellContents();
         }
     }
     else
     {
         int memberCellIndex2 = innermostMember.MemberCellIndex;
         int count2           = m_rows.Count;
         for (int j = 0; j < count2; j++)
         {
             ((ShimMatrixCell)m_rows[j][memberCellIndex2]).ResetCellContents();
         }
     }
 }
示例#2
0
        private void GenerateMatrixCells(ShimMatrixMember rowParentMember, ShimMatrixMember colParentMember, ShimMatrixMemberCollection columnMembers, bool inSubtotalRow, bool inSubtotalColumn)
        {
            if (columnMembers == null)
            {
                m_cells.Add(new ShimMatrixCell(m_owner, m_rowIndex, m_cells.Count, rowParentMember, colParentMember, inSubtotalRow || inSubtotalColumn));
                return;
            }
            int count = columnMembers.Count;

            for (int i = 0; i < count; i++)
            {
                ShimMatrixMember shimMatrixMember = columnMembers[i] as ShimMatrixMember;
                GenerateMatrixCells(rowParentMember, shimMatrixMember, shimMatrixMember.Children as ShimMatrixMemberCollection, inSubtotalRow, inSubtotalColumn || shimMatrixMember.CurrentRenderMatrixMember.IsTotal);
            }
        }
        private void AppendMatrixRows(ShimMatrixMember rowParentMember, ShimMatrixMemberCollection rowMembers, bool inSubtotalRow)
        {
            if (rowMembers == null)
            {
                m_rows.Add(new ShimMatrixRow(m_owner, m_rows.Count, rowParentMember, inSubtotalRow));
                return;
            }
            int count = rowMembers.Count;

            for (int i = 0; i < count; i++)
            {
                ShimMatrixMember shimMatrixMember = rowMembers[i] as ShimMatrixMember;
                AppendMatrixRows(shimMatrixMember, shimMatrixMember.Children as ShimMatrixMemberCollection, inSubtotalRow || shimMatrixMember.CurrentRenderMatrixMember.IsTotal);
            }
        }
 private void GenerateInnerHierarchy(Tablix owner, ShimMatrixMember parent, bool isColumn, MatrixMemberCollection children)
 {
     if (children != null)
     {
         MatrixMemberInfoCache matrixMemberInfoCache = null;
         if (m_isColumn)
         {
             matrixMemberInfoCache = ((children.MatrixHeadingDef.SubHeading == null) ? new MatrixMemberInfoCache((m_staticOrSubtotal != null) ? m_staticOrSubtotal.MemberCellIndex : AdjustedRenderCollectionIndex, -1) : new MatrixMemberInfoCache(-1, children.Count));
             m_currentMatrixMemberCellIndexes.Children[AdjustedRenderCollectionIndex] = matrixMemberInfoCache;
         }
         m_children = new ShimMatrixMemberCollection(this, owner, isColumn, this, children, matrixMemberInfoCache);
     }
     else
     {
         owner.GetAndIncrementMemberCellDefinitionIndex();
     }
 }
        internal ShimMatrixMemberCollection(IDefinitionPath parentDefinitionPath, Tablix owner, bool isColumnGroup, ShimMatrixMember parent, MatrixMemberCollection renderMemberCollection, MatrixMemberInfoCache matrixMemberCellIndexes)
            : base(parentDefinitionPath, owner, isColumnGroup)
        {
            m_definitionStartIndex = owner.GetCurrentMemberCellDefinitionIndex();
            int count = renderMemberCollection.Count;

            if (renderMemberCollection[0].IsStatic)
            {
                m_children = new ShimMatrixMember[count];
                for (int i = 0; i < count; i++)
                {
                    m_children[i] = new ShimMatrixMember(this, owner, parent, i, isColumnGroup, i, renderMemberCollection[i], isAfterSubtotal: false, matrixMemberCellIndexes);
                }
            }
            else
            {
                m_dynamicSubgroupChildIndex = 0;
                bool flag  = renderMemberCollection.MatrixHeadingDef.Subtotal != null;
                bool flag2 = flag && renderMemberCollection.MatrixHeadingDef.Subtotal.Position == Subtotal.PositionType.After;
                m_children = new ShimMatrixMember[(!flag) ? 1 : 2];
                if (flag)
                {
                    m_subtotalChildIndex = 0;
                    if (flag2)
                    {
                        m_subtotalChildIndex++;
                    }
                    else
                    {
                        m_dynamicSubgroupChildIndex++;
                    }
                }
                if (flag)
                {
                    Microsoft.ReportingServices.ReportRendering.ReportItem reportItem = renderMemberCollection[m_subtotalChildIndex].ReportItem;
                    if (reportItem != null)
                    {
                        if (isColumnGroup)
                        {
                            m_sizeDelta += reportItem.Width.ToMillimeters();
                        }
                        else
                        {
                            m_sizeDelta += reportItem.Height.ToMillimeters();
                        }
                    }
                }
                if (flag && !flag2)
                {
                    m_children[m_subtotalChildIndex] = new ShimMatrixMember(this, owner, parent, m_subtotalChildIndex, isColumnGroup, 0, renderMemberCollection[0], flag2, matrixMemberCellIndexes);
                }
                ShimRenderGroups renderGroups     = new ShimRenderGroups(renderMemberCollection, flag && !flag2, flag && flag2);
                ShimMatrixMember shimMatrixMember = (ShimMatrixMember)(m_children[m_dynamicSubgroupChildIndex] = new ShimMatrixMember(this, owner, parent, m_dynamicSubgroupChildIndex, isColumnGroup, m_dynamicSubgroupChildIndex, renderGroups, matrixMemberCellIndexes));
                if (flag && flag2)
                {
                    m_children[m_subtotalChildIndex] = new ShimMatrixMember(this, owner, parent, m_subtotalChildIndex, isColumnGroup, count - 1, renderMemberCollection[count - 1], flag2, matrixMemberCellIndexes);
                }
                m_sizeDelta += shimMatrixMember.SizeDelta;
            }
            m_definitionEndIndex = owner.GetCurrentMemberCellDefinitionIndex();
        }
示例#6
0
 internal ShimMatrixRow(Tablix owner, int rowIndex, ShimMatrixMember rowParentMember, bool inSubtotalRow)
     : base(owner, rowIndex)
 {
     m_cells = new List <ShimMatrixCell>();
     GenerateMatrixCells(rowParentMember, null, owner.ColumnHierarchy.MemberCollection as ShimMatrixMemberCollection, inSubtotalRow, inSubtotalRow);
 }
 internal ShimMatrixMember(IDefinitionPath parentDefinitionPath, Tablix owner, ShimMatrixMember parent, int parentCollectionIndex, bool isColumn, int renderCollectionIndex, ShimRenderGroups renderGroups, MatrixMemberInfoCache matrixMemberCellIndexes)
     : base(parentDefinitionPath, owner, parent, parentCollectionIndex, isColumn)
 {
     m_renderCollectionIndex          = renderCollectionIndex;
     m_currentMatrixMemberCellIndexes = matrixMemberCellIndexes;
     m_definitionStartIndex           = owner.GetCurrentMemberCellDefinitionIndex();
     m_group = new Group(owner, renderGroups, this);
     GenerateInnerHierarchy(owner, parent, isColumn, ((MatrixMember)m_group.CurrentShimRenderGroup).Children);
     m_definitionEndIndex = owner.GetCurrentMemberCellDefinitionIndex();
 }
 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();
 }
 internal ShimMatrixCell(Tablix owner, int rowIndex, int colIndex, ShimMatrixMember rowParentMember, ShimMatrixMember colParentMember, bool inSubtotal)
     : base(owner, rowIndex, colIndex, inSubtotal)
 {
     m_rowParentMember = rowParentMember;
     m_colParentMember = colParentMember;
 }
示例#10
0
 public ShimMatrixMemberVisibility(ShimMatrixMember owner)
 {
     m_owner = owner;
 }