internal MatrixMemberCollection(Matrix owner, MatrixMember parent, MatrixHeading headingDef, MatrixHeadingInstanceList headingInstances, List <int> memberMapping, bool isParentSubTotal)
        {
            m_owner            = owner;
            m_parent           = parent;
            m_headingInstances = headingInstances;
            m_headingDef       = headingDef;
            m_memberMapping    = memberMapping;
            m_isParentSubTotal = isParentSubTotal;
            if (!owner.NoRows)
            {
                return;
            }
            Subtotal subtotal = m_headingDef.Subtotal;

            if (subtotal != null)
            {
                if (subtotal.Position == Subtotal.PositionType.After)
                {
                    m_subTotalPosition = 1;
                }
                else
                {
                    m_subTotalPosition = 0;
                }
            }
        }
Ejemplo n.º 2
0
        public static List <int> CalculateMapping(MatrixHeading headingDef, MatrixHeadingInstanceList headingInstances, bool inParentSubtotal)
        {
            List <int> list = new List <int>();

            if (headingInstances == null)
            {
                return(list);
            }
            bool flag = true;

            for (int i = 0; i < headingInstances.Count; i++)
            {
                if (inParentSubtotal || headingInstances[i].IsSubtotal || !Matrix.IsEmpty(headingDef, headingInstances[i]))
                {
                    if (!headingInstances[i].IsSubtotal)
                    {
                        flag = false;
                    }
                    list.Add(i);
                }
            }
            if (flag && list.Count <= 1)
            {
                list.Clear();
            }
            return(list);
        }
Ejemplo n.º 3
0
 public MatrixMemberCollection(Matrix owner, MatrixMember parent, MatrixHeading headingDef, MatrixHeadingInstanceList headingInstances, List <int> memberMapping, bool isParentSubTotal)
 {
     this.m_owner            = owner;
     this.m_parent           = parent;
     this.m_headingInstances = headingInstances;
     this.m_headingDef       = headingDef;
     this.m_memberMapping    = memberMapping;
     this.m_isParentSubTotal = isParentSubTotal;
     if (owner.NoRows)
     {
         Subtotal subtotal = this.m_headingDef.Subtotal;
         if (subtotal != null)
         {
             if (subtotal.Position == Subtotal.PositionType.After)
             {
                 this.m_subTotalPosition = 1;
             }
             else
             {
                 this.m_subTotalPosition = 0;
             }
         }
     }
 }
Ejemplo n.º 4
0
 private void CalculateGroupsCellsBeforeRowHeaders()
 {
     this.m_groupsBeforeRowHeaders = ((AspNetCore.ReportingServices.ReportProcessing.Matrix)base.ReportItemDef).GroupsBeforeRowHeaders;
     if (this.m_groupsBeforeRowHeaders > 0 && base.ReportItemInstance != null)
     {
         MatrixHeadingInstanceList columnInstances        = ((MatrixInstance)base.ReportItemInstance).ColumnInstances;
         MatrixMemberCollection    matrixMemberCollection = null;
         int num = -1;
         if (columnInstances != null && 0 < columnInstances.Count)
         {
             num = columnInstances.Count - 1;
             if (columnInstances[0].IsSubtotal || (this.m_groupsBeforeRowHeaders == num && columnInstances[num].IsSubtotal))
             {
                 this.m_groupsBeforeRowHeaders++;
             }
         }
         this.m_cellsBeforeRowHeaders = 0;
         if (this.m_groupsBeforeRowHeaders > num + 1)
         {
             this.m_groupsBeforeRowHeaders = 0;
         }
         else
         {
             matrixMemberCollection = this.ColumnMemberCollection;
         }
         for (int i = 0; i < this.m_groupsBeforeRowHeaders; i++)
         {
             this.m_cellsBeforeRowHeaders += matrixMemberCollection[i].ColumnSpan;
         }
     }
     else
     {
         this.m_groupsBeforeRowHeaders = 0;
         this.m_cellsBeforeRowHeaders  = 0;
     }
 }