Ejemplo n.º 1
0
        internal int DynamicInitialize(bool column, int level, InitializationContext context, ref double cornerSize)
        {
            m_level     = level;
            m_isColumn  = column;
            m_sizeValue = context.ValidateSize(ref m_size, column ? "Height" : "Width");
            cornerSize  = Math.Round(cornerSize + m_sizeValue, Validator.DecimalPrecision);
            if (m_grouping == null)
            {
                if (SubHeading != null)
                {
                    context.RegisterReportItems(m_reportItems);
                    SubHeading.DynamicInitialize(column, ++level, context, ref cornerSize);
                    context.UnRegisterReportItems(m_reportItems);
                }
                return(1);
            }
            context.ExprHostBuilder.MatrixDynamicGroupStart(m_grouping.Name);
            if (m_subtotal != null)
            {
                m_subtotal.RegisterReportItems(context);
                m_subtotal.Initialize(context);
            }
            context.Location |= LocationFlags.InGrouping;
            context.RegisterGroupingScope(m_grouping.Name, m_grouping.SimpleGroupExpressions, m_grouping.Aggregates, m_grouping.PostSortAggregates, m_grouping.RecursiveAggregates, m_grouping, isMatrixGrouping: true);
            ObjectType objectType = context.ObjectType;
            string     objectName = context.ObjectName;

            context.ObjectType = ObjectType.Grouping;
            context.ObjectName = m_grouping.Name;
            Initialize(context);
            context.RegisterReportItems(m_reportItems);
            if (m_visibility != null)
            {
                m_visibility.Initialize(context, isContainer: true, tableRowCol: false);
            }
            if (SubHeading != null)
            {
                m_subtotalSpan = SubHeading.DynamicInitialize(column, ++level, context, ref cornerSize);
            }
            else
            {
                m_subtotalSpan = 1;
            }
            m_reportItems.Initialize(context, registerRunningValues: true);
            if (m_visibility != null)
            {
                m_visibility.UnRegisterReceiver(context);
            }
            context.UnRegisterReportItems(m_reportItems);
            context.ObjectType = objectType;
            context.ObjectName = objectName;
            context.UnRegisterGroupingScope(m_grouping.Name, isMatrixGrouping: true);
            if (m_subtotal != null)
            {
                m_subtotal.UnregisterReportItems(context);
            }
            m_hasExprHost = context.ExprHostBuilder.MatrixDynamicGroupEnd(column);
            return(m_subtotalSpan + 1);
        }
Ejemplo n.º 2
0
        internal int DynamicInitialize(bool column, int level, InitializationContext context)
        {
            m_level    = level;
            m_isColumn = column;
            if (m_grouping == null)
            {
                if (SubHeading != null)
                {
                    SubHeading.DynamicInitialize(column, ++level, context);
                }
                return(1);
            }
            context.ExprHostBuilder.ChartDynamicGroupStart(m_grouping.Name);
            if (m_subtotal != null)
            {
                m_subtotal.RegisterReportItems(context);
                m_subtotal.Initialize(context);
            }
            context.Location |= LocationFlags.InGrouping;
            context.RegisterGroupingScope(m_grouping.Name, m_grouping.SimpleGroupExpressions, m_grouping.Aggregates, m_grouping.PostSortAggregates, m_grouping.RecursiveAggregates, m_grouping);
            ObjectType objectType = context.ObjectType;
            string     objectName = context.ObjectName;

            context.ObjectType = ObjectType.Grouping;
            context.ObjectName = m_grouping.Name;
            Initialize(context);
            if (m_visibility != null)
            {
                m_visibility.Initialize(context, isContainer: true, tableRowCol: false);
            }
            if (SubHeading != null)
            {
                m_subtotalSpan = SubHeading.DynamicInitialize(column, ++level, context);
            }
            else
            {
                m_subtotalSpan = 1;
            }
            if (m_labels != null)
            {
                LabelCollectionInitialize(context, registerRunningValues: true, isStatic: false);
            }
            if (m_visibility != null)
            {
                m_visibility.UnRegisterReceiver(context);
            }
            context.ObjectType = objectType;
            context.ObjectName = objectName;
            context.UnRegisterGroupingScope(m_grouping.Name);
            if (m_subtotal != null)
            {
                m_subtotal.UnregisterReportItems(context);
            }
            m_hasExprHost = context.ExprHostBuilder.ChartDynamicGroupEnd(column);
            return(m_subtotalSpan + 1);
        }