Пример #1
0
 internal void DynamicRegisterReceiver(InitializationContext context)
 {
     if (m_grouping == null)
     {
         if (SubHeading != null)
         {
             context.RegisterReportItems(m_reportItems);
             SubHeading.DynamicRegisterReceiver(context);
             context.UnRegisterReportItems(m_reportItems);
         }
         return;
     }
     if (m_subtotal != null)
     {
         m_subtotal.RegisterReceiver(context);
     }
     context.RegisterReportItems(m_reportItems);
     if (m_visibility != null)
     {
         m_visibility.RegisterReceiver(context, isContainer: true);
     }
     if (SubHeading != null)
     {
         SubHeading.DynamicRegisterReceiver(context);
     }
     m_reportItems.RegisterReceiver(context);
     if (m_visibility != null)
     {
         m_visibility.UnRegisterReceiver(context);
     }
     context.UnRegisterReportItems(m_reportItems);
 }
Пример #2
0
 internal override void RegisterReceiver(InitializationContext context)
 {
     if (m_visibility != null)
     {
         m_visibility.RegisterReceiver(context, isContainer: true);
     }
     m_reportItems.RegisterReceiver(context);
     if (m_visibility != null)
     {
         m_visibility.UnRegisterReceiver(context);
     }
 }
Пример #3
0
 internal override void RegisterReceiver(InitializationContext context)
 {
     context.RegisterReportItems(m_cornerReportItems);
     if (m_visibility != null)
     {
         m_visibility.RegisterReceiver(context, isContainer: true);
     }
     m_cornerReportItems.RegisterReceiver(context);
     ColumnsRegisterReceiver(context);
     RowsRegisterReceiver(context);
     MatrixCellRegisterReceiver(context);
     if (m_visibility != null)
     {
         m_visibility.UnRegisterReceiver(context);
     }
     context.UnRegisterReportItems(m_cornerReportItems);
 }
Пример #4
0
        private void MatrixCellInitialize(InitializationContext context, int expectedNumberOfMatrixColumns, int expectedNumberOfMatrixRows, bool computedSubtotal, out double totalCellHeight, out double totalCellWidth)
        {
            if (expectedNumberOfMatrixColumns != m_matrixColumns.Count)
            {
                context.ErrorContext.Register(ProcessingErrorCode.rsWrongNumberOfMatrixColumns, Severity.Error, context.ObjectType, context.ObjectName, "MatrixColumns");
            }
            if (expectedNumberOfMatrixRows != m_matrixRows.Count)
            {
                context.ErrorContext.Register(ProcessingErrorCode.rsWrongNumberOfMatrixRows, Severity.Error, context.ObjectType, context.ObjectName, "MatrixRows");
            }
            for (int i = 0; i < m_matrixRows.Count; i++)
            {
                if (expectedNumberOfMatrixColumns != m_matrixRows[i].NumberOfMatrixCells)
                {
                    context.ErrorContext.Register(ProcessingErrorCode.rsWrongNumberOfMatrixCells, Severity.Error, context.ObjectType, context.ObjectName, "MatrixCells");
                }
            }
            totalCellHeight = 0.0;
            totalCellWidth  = 0.0;
            for (int j = 0; j < m_matrixColumns.Count; j++)
            {
                m_matrixColumns[j].Initialize(context);
                totalCellWidth = Math.Round(totalCellWidth + m_matrixColumns[j].WidthValue, Validator.DecimalPrecision);
            }
            for (int k = 0; k < m_matrixRows.Count; k++)
            {
                m_matrixRows[k].Initialize(context);
                totalCellHeight = Math.Round(totalCellHeight + m_matrixRows[k].HeightValue, Validator.DecimalPrecision);
            }
            context.Location   = (context.Location | LocationFlags.InMatrixCell | LocationFlags.InMatrixCellTopLevelItem);
            context.MatrixName = m_name;
            context.RegisterTablixCellScope(m_columns.SubHeading == null && m_columns.Grouping == null, m_cellAggregates, m_cellPostSortAggregates);
            for (MatrixHeading matrixHeading = m_rows; matrixHeading != null; matrixHeading = matrixHeading.SubHeading)
            {
                context.RegisterReportItems(matrixHeading.ReportItems);
                if (matrixHeading.Grouping != null)
                {
                    context.Location |= LocationFlags.InGrouping;
                    context.RegisterGroupingScopeForTablixCell(matrixHeading.Grouping.Name, column: false, matrixHeading.Grouping.SimpleGroupExpressions, matrixHeading.Aggregates, matrixHeading.PostSortAggregates, matrixHeading.RecursiveAggregates, matrixHeading.Grouping);
                }
            }
            if (m_rows.Grouping != null && m_rows.Subtotal != null && m_staticRows != null)
            {
                context.CopyRunningValues(StaticRows.ReportItems.RunningValues, m_aggregates);
            }
            for (MatrixHeading matrixHeading = m_columns; matrixHeading != null; matrixHeading = matrixHeading.SubHeading)
            {
                context.RegisterReportItems(matrixHeading.ReportItems);
                if (matrixHeading.Grouping != null)
                {
                    context.Location |= LocationFlags.InGrouping;
                    context.RegisterGroupingScopeForTablixCell(matrixHeading.Grouping.Name, column: true, matrixHeading.Grouping.SimpleGroupExpressions, matrixHeading.Aggregates, matrixHeading.PostSortAggregates, matrixHeading.RecursiveAggregates, matrixHeading.Grouping);
                }
            }
            if (m_columns.Grouping != null && m_columns.Subtotal != null && m_staticColumns != null)
            {
                context.CopyRunningValues(StaticColumns.ReportItems.RunningValues, m_aggregates);
            }
            if (computedSubtotal)
            {
                m_cellReportItems.MarkChildrenComputed();
            }
            context.RegisterReportItems(m_cellReportItems);
            OWCFlagsCalculator.Calculate(this);
            bool registerHiddenReceiver = context.RegisterHiddenReceiver;

            context.RegisterHiddenReceiver = false;
            context.RegisterScopeInMatrixCell(base.Name, "0_CellScope" + base.Name, registerMatrixCellScope: true);
            m_cellReportItems.Initialize(context, registerRunningValues: true);
            if (context.IsRunningValueDirectionColumn())
            {
                m_processingInnerGrouping = ProcessingInnerGroupings.Row;
            }
            context.UpdateScopesInMatrixCells(base.Name, GenerateUserSortGroupingList(ProcessingInnerGroupings.Row == m_processingInnerGrouping));
            context.TextboxesWithDetailSortExpressionInitialize();
            context.RegisterHiddenReceiver = registerHiddenReceiver;
            for (MatrixHeading matrixHeading = m_rows; matrixHeading != null; matrixHeading = matrixHeading.SubHeading)
            {
                context.UnRegisterReportItems(matrixHeading.ReportItems);
                if (matrixHeading.Grouping != null)
                {
                    context.UnRegisterGroupingScopeForTablixCell(matrixHeading.Grouping.Name, column: false);
                    context.ProcessUserSortInnerScope(matrixHeading.Grouping.Name, isMatrixGroup: true, isMatrixColumnGroup: false);
                }
            }
            for (MatrixHeading matrixHeading = m_rows; matrixHeading != null; matrixHeading = matrixHeading.SubHeading)
            {
                if (matrixHeading.Grouping != null)
                {
                    context.ValidateUserSortInnerScope(matrixHeading.Grouping.Name);
                }
            }
            for (MatrixHeading matrixHeading = m_columns; matrixHeading != null; matrixHeading = matrixHeading.SubHeading)
            {
                context.UnRegisterReportItems(matrixHeading.ReportItems);
                if (matrixHeading.Grouping != null)
                {
                    context.UnRegisterGroupingScopeForTablixCell(matrixHeading.Grouping.Name, column: true);
                    context.ProcessUserSortInnerScope(matrixHeading.Grouping.Name, isMatrixGroup: true, isMatrixColumnGroup: true);
                }
            }
            for (MatrixHeading matrixHeading = m_columns; matrixHeading != null; matrixHeading = matrixHeading.SubHeading)
            {
                if (matrixHeading.Grouping != null)
                {
                    context.ValidateUserSortInnerScope(matrixHeading.Grouping.Name);
                }
            }
            m_cellReportItems.RegisterReceiver(context);
            context.UnRegisterReportItems(m_cellReportItems);
            context.UnRegisterTablixCellScope();
        }
Пример #5
0
 internal void RegisterReceiver(InitializationContext context)
 {
     context.RegisterReportItems(m_reportItems);
     m_reportItems.RegisterReceiver(context);
     context.UnRegisterReportItems(m_reportItems);
 }