Ejemplo n.º 1
0
        private void InternalInitialize(InitializationContext context)
        {
            context.Location = (context.Location | LocationFlags.InDataSet | LocationFlags.InDataRegion);
            context.ExprHostBuilder.MatrixStart(m_name);
            base.Initialize(context);
            context.RegisterRunningValues(m_runningValues);
            if (m_visibility != null)
            {
                m_visibility.Initialize(context, isContainer: true, tableRowCol: false);
            }
            CornerInitialize(context);
            context.Location &= ~LocationFlags.InMatrixCellTopLevelItem;
            bool computedSubtotal = false;
            bool flag             = false;

            context.Location |= LocationFlags.InMatrixGroupHeader;
            ColumnsInitialize(context, out int expectedNumberOfMatrixColumns, out double size, out computedSubtotal);
            flag = computedSubtotal;
            RowsInitialize(context, out int expectedNumberOfMatrixRows, out double size2, out computedSubtotal);
            context.Location &= ~LocationFlags.InMatrixGroupHeader;
            if (computedSubtotal)
            {
                flag = true;
            }
            MatrixCellInitialize(context, expectedNumberOfMatrixColumns, expectedNumberOfMatrixRows, flag, out double totalCellHeight, out double totalCellWidth);
            if (m_visibility != null)
            {
                m_visibility.UnRegisterReceiver(context);
            }
            context.UnRegisterRunningValues(m_runningValues);
            CopyHeadingAggregates(m_rows);
            m_rows.TransferHeadingAggregates();
            CopyHeadingAggregates(m_columns);
            m_columns.TransferHeadingAggregates();
            m_heightValue = size + totalCellHeight;
            m_height      = Converter.ConvertSize(m_heightValue);
            m_widthValue  = size2 + totalCellWidth;
            m_width       = Converter.ConvertSize(m_widthValue);
            if (!context.ErrorContext.HasError)
            {
                TopLevelItemsSizes.Calculate(this, size2, size, totalCellWidth, totalCellHeight, context);
            }
            base.ExprHostID = context.ExprHostBuilder.MatrixEnd();
        }