Exemplo n.º 1
0
 public ChartHeadingInstance(ReportProcessing.ProcessingContext pc, int headingCellIndex, ChartHeading chartHeadingDef, int labelIndex, VariantList groupExpressionValues)
 {
     this.m_uniqueName = pc.CreateUniqueName();
     if (chartHeadingDef.SubHeading != null)
     {
         this.m_subHeadingInstances = new ChartHeadingInstanceList();
     }
     base.m_instanceInfo    = new ChartHeadingInstanceInfo(pc, headingCellIndex, chartHeadingDef, labelIndex, groupExpressionValues);
     this.m_chartHeadingDef = chartHeadingDef;
 }
Exemplo n.º 2
0
        private void ChartDataPointInitialize(InitializationContext context, int expectedNumberOfCategories, int expectedNumberOfSeries, bool computedCells)
        {
            if (this.m_cellDataPoints == null || this.m_cellDataPoints.Count == 0)
            {
                context.ErrorContext.Register(ProcessingErrorCode.rsMissingChartDataPoints, Severity.Error, context.ObjectType, context.ObjectName, "ChartData");
            }
            else
            {
                if (expectedNumberOfSeries != this.m_numberOfSeriesDataPoints.Count)
                {
                    context.ErrorContext.Register(ProcessingErrorCode.rsWrongNumberOfChartSeries, Severity.Error, context.ObjectType, context.ObjectName, "ChartSeries");
                }
                bool flag = false;
                for (int i = 0; i < this.m_numberOfSeriesDataPoints.Count; i++)
                {
                    if (flag)
                    {
                        break;
                    }
                    if (this.m_numberOfSeriesDataPoints[i] != expectedNumberOfCategories)
                    {
                        flag = true;
                    }
                }
                if (flag)
                {
                    context.ErrorContext.Register(ProcessingErrorCode.rsWrongNumberOfChartDataPointsInSeries, Severity.Error, context.ObjectType, context.ObjectName, "ChartSeries");
                }
                int num = expectedNumberOfCategories * expectedNumberOfSeries;
                if (num != this.m_cellDataPoints.Count)
                {
                    context.ErrorContext.Register(ProcessingErrorCode.rsWrongNumberOfChartDataPoints, Severity.Error, context.ObjectType, context.ObjectName, "DataPoints", this.m_cellDataPoints.Count.ToString(CultureInfo.InvariantCulture), num.ToString(CultureInfo.InvariantCulture));
                }
                context.Location  |= LocationFlags.InMatrixCell;
                context.MatrixName = base.m_name;
                context.RegisterTablixCellScope(this.m_columns.SubHeading == null && null == this.m_columns.Grouping, base.m_cellAggregates, base.m_cellPostSortAggregates);
                for (ChartHeading chartHeading = this.m_rows; chartHeading != null; chartHeading = chartHeading.SubHeading)
                {
                    if (chartHeading.Grouping != null)
                    {
                        context.Location |= LocationFlags.InGrouping;
                        context.RegisterGroupingScopeForTablixCell(chartHeading.Grouping.Name, false, chartHeading.Grouping.SimpleGroupExpressions, chartHeading.Aggregates, chartHeading.PostSortAggregates, chartHeading.RecursiveAggregates, chartHeading.Grouping);
                    }
                }
                if (this.m_rows.Grouping != null && this.m_rows.Subtotal != null && this.m_staticRows != null)
                {
                    context.CopyRunningValues(this.StaticRows.RunningValues, base.m_aggregates);
                }
                for (ChartHeading chartHeading = this.m_columns; chartHeading != null; chartHeading = chartHeading.SubHeading)
                {
                    if (chartHeading.Grouping != null)
                    {
                        context.Location |= LocationFlags.InGrouping;
                        context.RegisterGroupingScopeForTablixCell(chartHeading.Grouping.Name, true, chartHeading.Grouping.SimpleGroupExpressions, chartHeading.Aggregates, chartHeading.PostSortAggregates, chartHeading.RecursiveAggregates, chartHeading.Grouping);
                    }
                }
                if (this.m_columns.Grouping != null && this.m_columns.Subtotal != null && this.m_staticColumns != null)
                {
                    context.CopyRunningValues(this.StaticColumns.RunningValues, base.m_aggregates);
                }
                Global.Tracer.Assert(null != this.m_cellDataPoints);
                int count = this.m_cellDataPoints.Count;
                int num2  = 1;
                switch (this.m_type)
                {
                case ChartTypes.Stock:
                    num2 = ((ChartSubTypes.HighLowClose != this.m_subType) ? 4 : 3);
                    break;

                case ChartTypes.Bubble:
                    num2 = 3;
                    break;

                case ChartTypes.Scatter:
                    num2 = 2;
                    break;
                }
                context.RegisterRunningValues(this.m_cellRunningValues);
                for (int j = 0; j < count; j++)
                {
                    Global.Tracer.Assert(null != this.m_cellDataPoints[j].DataValues);
                    if (num2 > this.m_cellDataPoints[j].DataValues.Count)
                    {
                        context.ErrorContext.Register(ProcessingErrorCode.rsWrongNumberOfDataValues, Severity.Error, context.ObjectType, context.ObjectName, "DataValue", this.m_cellDataPoints[j].DataValues.Count.ToString(CultureInfo.InvariantCulture), num2.ToString(CultureInfo.InvariantCulture));
                    }
                    this.m_cellDataPoints[j].Initialize(context);
                }
                context.UnRegisterRunningValues(this.m_cellRunningValues);
                if (context.IsRunningValueDirectionColumn())
                {
                    base.m_processingInnerGrouping = ProcessingInnerGroupings.Row;
                }
                for (ChartHeading chartHeading = this.m_rows; chartHeading != null; chartHeading = chartHeading.SubHeading)
                {
                    if (chartHeading.Grouping != null)
                    {
                        context.UnRegisterGroupingScopeForTablixCell(chartHeading.Grouping.Name, false);
                    }
                }
                for (ChartHeading chartHeading = this.m_columns; chartHeading != null; chartHeading = chartHeading.SubHeading)
                {
                    if (chartHeading.Grouping != null)
                    {
                        context.UnRegisterGroupingScopeForTablixCell(chartHeading.Grouping.Name, true);
                    }
                }
                context.UnRegisterTablixCellScope();
            }
        }
Exemplo n.º 3
0
 public ChartHeadingInstanceInfo(ReportProcessing.ProcessingContext pc, int headingCellIndex, ChartHeading chartHeadingDef, int labelIndex, VariantList groupExpressionValues)
 {
     this.m_headingCellIndex = headingCellIndex;
     if (chartHeadingDef.ChartGroupExpression)
     {
         if (groupExpressionValues == null || DBNull.Value == ((ArrayList)groupExpressionValues)[0])
         {
             this.m_groupExpressionValue = null;
         }
         else
         {
             this.m_groupExpressionValue = ((ArrayList)groupExpressionValues)[0];
         }
     }
     if (chartHeadingDef.Labels != null)
     {
         ExpressionInfo expressionInfo = chartHeadingDef.Labels[labelIndex];
         if (expressionInfo != null)
         {
             if (chartHeadingDef.Grouping != null)
             {
                 this.m_headingLabel = pc.ReportRuntime.EvaluateChartDynamicHeadingLabelExpression(chartHeadingDef, expressionInfo, chartHeadingDef.DataRegionDef.Name);
             }
             else
             {
                 this.m_headingLabel = pc.ReportRuntime.EvaluateChartStaticHeadingLabelExpression(chartHeadingDef, expressionInfo, chartHeadingDef.DataRegionDef.Name);
             }
         }
     }
     if (chartHeadingDef.Grouping == null)
     {
         this.m_staticGroupingIndex = labelIndex;
     }
     else if (chartHeadingDef.Grouping.CustomProperties != null)
     {
         this.m_customPropertyInstances = chartHeadingDef.Grouping.CustomProperties.EvaluateExpressions(chartHeadingDef.DataRegionDef.ObjectType, chartHeadingDef.DataRegionDef.Name, chartHeadingDef.Grouping.Name + ".", pc);
     }
 }