예제 #1
0
 public CustomReportItemHeadingInstance(ReportProcessing.ProcessingContext pc, int headingCellIndex, CustomReportItemHeading headingDef, VariantList groupExpressionValues, int recursiveLevel)
 {
     if (headingDef.InnerHeadings != null)
     {
         this.m_subHeadingInstances = new CustomReportItemHeadingInstanceList();
     }
     this.m_headingDef       = headingDef;
     this.m_headingCellIndex = headingCellIndex;
     if (groupExpressionValues != null)
     {
         this.m_groupExpressionValues = new VariantList(groupExpressionValues.Count);
         for (int i = 0; i < groupExpressionValues.Count; i++)
         {
             if (((ArrayList)groupExpressionValues)[i] == null || DBNull.Value == ((ArrayList)groupExpressionValues)[i])
             {
                 this.m_groupExpressionValues.Add(null);
             }
             else
             {
                 this.m_groupExpressionValues.Add(((ArrayList)groupExpressionValues)[i]);
             }
         }
     }
     if (headingDef.Grouping != null && headingDef.Grouping.GroupLabel != null)
     {
         this.m_label = pc.NavigationInfo.RegisterLabel(pc.ReportRuntime.EvaluateGroupingLabelExpression(headingDef.Grouping, headingDef.DataRegionDef.ObjectType, headingDef.DataRegionDef.Name));
     }
     if (headingDef.CustomProperties != null)
     {
         this.m_customPropertyInstances = headingDef.CustomProperties.EvaluateExpressions(headingDef.DataRegionDef.ObjectType, headingDef.DataRegionDef.Name, "DataGrouping.", pc);
     }
     this.m_recursiveLevel = recursiveLevel;
 }
        public CustomReportItemCellInstance(int rowIndex, int colIndex, CustomReportItem definition, ReportProcessing.ProcessingContext pc)
        {
            this.m_rowIndex    = rowIndex;
            this.m_columnIndex = colIndex;
            Global.Tracer.Assert(definition != null && definition.DataRowCells != null && rowIndex < definition.DataRowCells.Count && colIndex < definition.DataRowCells[rowIndex].Count && 0 < definition.DataRowCells[rowIndex][colIndex].Count);
            DataValueCRIList dataValueCRIList = definition.DataRowCells[rowIndex][colIndex];

            Global.Tracer.Assert(null != dataValueCRIList);
            this.m_dataValueInstances = dataValueCRIList.EvaluateExpressions(definition.ObjectType, definition.Name, null, dataValueCRIList.RDLRowIndex, dataValueCRIList.RDLColumnIndex, pc);
            Global.Tracer.Assert(null != this.m_dataValueInstances);
        }
        private void ConstructorHelper(ReportProcessing.ProcessingContext pc, ReportItem reportItemDef, ReportItemInstance owner)
        {
            this.m_reportItemDef = reportItemDef;
            Style styleClass = reportItemDef.StyleClass;

            if (styleClass != null && styleClass.ExpressionList != null && 0 < styleClass.ExpressionList.Count)
            {
                this.m_styleAttributeValues = new object[styleClass.ExpressionList.Count];
            }
            ReportProcessing.RuntimeRICollection.EvalReportItemAttr(reportItemDef, owner, this, pc);
            if (reportItemDef.CustomProperties != null)
            {
                this.m_customPropertyInstances = reportItemDef.CustomProperties.EvaluateExpressions(reportItemDef.ObjectType, reportItemDef.Name, null, pc);
            }
        }
예제 #4
0
 public TableGroupInstanceInfo(ReportProcessing.ProcessingContext pc, TableGroup tableGroupDef, TableGroupInstance owner)
 {
     if (pc.ShowHideType != 0)
     {
         this.m_startHidden = pc.ProcessReceiver(owner.UniqueName, tableGroupDef.Visibility, tableGroupDef.ExprHost, tableGroupDef.DataRegionDef.ObjectType, tableGroupDef.DataRegionDef.Name);
     }
     tableGroupDef.StartHidden = this.m_startHidden;
     if (tableGroupDef.Grouping.GroupLabel != null)
     {
         this.m_label = pc.NavigationInfo.RegisterLabel(pc.ReportRuntime.EvaluateGroupingLabelExpression(tableGroupDef.Grouping, tableGroupDef.DataRegionDef.ObjectType, tableGroupDef.DataRegionDef.Name));
     }
     if (tableGroupDef.Grouping.CustomProperties != null)
     {
         this.m_customPropertyInstances = tableGroupDef.Grouping.CustomProperties.EvaluateExpressions(tableGroupDef.DataRegionDef.ObjectType, tableGroupDef.DataRegionDef.Name, tableGroupDef.Grouping.Name + ".", pc);
     }
     pc.ChunkManager.AddInstance(this, owner, pc.InPageSection);
 }
예제 #5
0
        public DataValueInstanceList EvaluateExpressions(ObjectType objectType, string objectName, string prefix, int rowIndex, int cellIndex, ReportProcessing.ProcessingContext pc)
        {
            int count = this.Count;
            DataValueInstanceList dataValueInstanceList = new DataValueInstanceList(count);
            bool flag = rowIndex < 0;
            CustomPropertyUniqueNameValidator customPropertyUniqueNameValidator = null;

            if (flag)
            {
                customPropertyUniqueNameValidator = new CustomPropertyUniqueNameValidator();
            }
            for (int i = 0; i < count; i++)
            {
                DataValue         dataValue         = this[i];
                DataValueInstance dataValueInstance = new DataValueInstance();
                bool   flag2             = true;
                string propertyNameValue = null;
                if (dataValue.Name != null)
                {
                    if (ExpressionInfo.Types.Constant != dataValue.Name.Type)
                    {
                        dataValueInstance.Name = pc.ReportRuntime.EvaluateDataValueNameExpression(dataValue, objectType, objectName, DataValueList.CreatePropertyNameString(prefix, rowIndex + 1, cellIndex + 1, i + 1) + ".Name");
                        propertyNameValue      = dataValueInstance.Name;
                    }
                    else
                    {
                        propertyNameValue = dataValue.Name.Value;
                    }
                }
                if (flag)
                {
                    flag2 = customPropertyUniqueNameValidator.Validate(Severity.Warning, objectType, objectName, propertyNameValue, pc.ErrorContext);
                }
                if (flag2)
                {
                    Global.Tracer.Assert(null != dataValue.Value);
                    if (ExpressionInfo.Types.Constant != dataValue.Value.Type)
                    {
                        dataValueInstance.Value = pc.ReportRuntime.EvaluateDataValueValueExpression(dataValue, objectType, objectName, DataValueList.CreatePropertyNameString(prefix, rowIndex + 1, cellIndex + 1, i + 1) + ".Value");
                    }
                }
                dataValueInstanceList.Add(dataValueInstance);
            }
            return(dataValueInstanceList);
        }
예제 #6
0
        public MatrixHeadingInstanceInfo(ReportProcessing.ProcessingContext pc, int headingCellIndex, MatrixHeading matrixHeadingDef, MatrixHeadingInstance owner, bool isSubtotal, int reportItemDefIndex, VariantList groupExpressionValues, out NonComputedUniqueNames nonComputedUniqueNames)
        {
            ReportItemCollection reportItems;

            if (isSubtotal)
            {
                reportItems = matrixHeadingDef.Subtotal.ReportItems;
            }
            else
            {
                reportItems = matrixHeadingDef.ReportItems;
                if (matrixHeadingDef.OwcGroupExpression)
                {
                    if (groupExpressionValues == null || DBNull.Value == ((ArrayList)groupExpressionValues)[0])
                    {
                        this.m_groupExpressionValue = null;
                    }
                    else
                    {
                        this.m_groupExpressionValue = ((ArrayList)groupExpressionValues)[0];
                    }
                }
            }
            if (0 < reportItems.Count && !reportItems.IsReportItemComputed(reportItemDefIndex))
            {
                this.m_contentUniqueNames = NonComputedUniqueNames.CreateNonComputedUniqueNames(pc, reportItems[reportItemDefIndex]);
            }
            nonComputedUniqueNames  = this.m_contentUniqueNames;
            this.m_headingCellIndex = headingCellIndex;
            if (!isSubtotal && pc.ShowHideType != 0)
            {
                this.m_startHidden = pc.ProcessReceiver(owner.UniqueName, matrixHeadingDef.Visibility, matrixHeadingDef.ExprHost, matrixHeadingDef.DataRegionDef.ObjectType, matrixHeadingDef.DataRegionDef.Name);
            }
            if (matrixHeadingDef.Grouping != null && matrixHeadingDef.Grouping.GroupLabel != null)
            {
                this.m_label = pc.NavigationInfo.RegisterLabel(pc.ReportRuntime.EvaluateGroupingLabelExpression(matrixHeadingDef.Grouping, matrixHeadingDef.DataRegionDef.ObjectType, matrixHeadingDef.DataRegionDef.Name));
            }
            if (matrixHeadingDef.Grouping != null && matrixHeadingDef.Grouping.CustomProperties != null)
            {
                this.m_customPropertyInstances = matrixHeadingDef.Grouping.CustomProperties.EvaluateExpressions(matrixHeadingDef.DataRegionDef.ObjectType, matrixHeadingDef.DataRegionDef.Name, matrixHeadingDef.Grouping.Name + ".", pc);
            }
            matrixHeadingDef.StartHidden = this.m_startHidden;
        }
        public AxisInstance(ReportProcessing.ProcessingContext pc, Chart chart, Axis axisDef, Axis.Mode mode)
        {
            this.m_uniqueName = pc.CreateUniqueName();
            string text = mode.ToString();

            if (axisDef.Title != null)
            {
                this.m_title = new ChartTitleInstance(pc, chart, axisDef.Title, text);
            }
            this.m_styleAttributeValues = Chart.CreateStyle(pc, axisDef.StyleClass, chart.Name + "." + text, this.m_uniqueName);
            if (axisDef.MajorGridLines != null)
            {
                this.m_majorGridLinesStyleAttributeValues = Chart.CreateStyle(pc, axisDef.MajorGridLines.StyleClass, chart.Name + "." + text + ".MajorGridLines", this.m_uniqueName);
            }
            if (axisDef.MinorGridLines != null)
            {
                this.m_minorGridLinesStyleAttributeValues = Chart.CreateStyle(pc, axisDef.MinorGridLines.StyleClass, chart.Name + "." + text + ".MinorGridLines", this.m_uniqueName);
            }
            if (axisDef.Min != null && ExpressionInfo.Types.Constant != axisDef.Min.Type)
            {
                this.m_minValue = pc.ReportRuntime.EvaluateChartAxisValueExpression(axisDef.ExprHost, axisDef.Min, chart.Name, text + ".Min", Axis.ExpressionType.Min);
            }
            if (axisDef.Max != null && ExpressionInfo.Types.Constant != axisDef.Max.Type)
            {
                this.m_maxValue = pc.ReportRuntime.EvaluateChartAxisValueExpression(axisDef.ExprHost, axisDef.Max, chart.Name, text + ".Max", Axis.ExpressionType.Max);
            }
            if (axisDef.CrossAt != null && ExpressionInfo.Types.Constant != axisDef.CrossAt.Type)
            {
                this.m_crossAtValue = pc.ReportRuntime.EvaluateChartAxisValueExpression(axisDef.ExprHost, axisDef.CrossAt, chart.Name, text + ".CrossAt", Axis.ExpressionType.CrossAt);
            }
            if (axisDef.MajorInterval != null && ExpressionInfo.Types.Constant != axisDef.MajorInterval.Type)
            {
                this.m_majorIntervalValue = pc.ReportRuntime.EvaluateChartAxisValueExpression(axisDef.ExprHost, axisDef.MajorInterval, chart.Name, text + ".MajorInterval", Axis.ExpressionType.MajorInterval);
            }
            if (axisDef.MinorInterval != null && ExpressionInfo.Types.Constant != axisDef.MinorInterval.Type)
            {
                this.m_minorIntervalValue = pc.ReportRuntime.EvaluateChartAxisValueExpression(axisDef.ExprHost, axisDef.MinorInterval, chart.Name, text + ".MinorInterval", Axis.ExpressionType.MinorInterval);
            }
            if (axisDef.CustomProperties != null)
            {
                this.m_customPropertyInstances = axisDef.CustomProperties.EvaluateExpressions(chart.ObjectType, chart.Name, text + ".", pc);
            }
        }
예제 #8
0
        public ChartDataPointInstanceInfo(ReportProcessing.ProcessingContext pc, Chart chart, ChartDataPoint dataPointDef, int dataPointIndex, ChartDataPointInstance owner)
        {
            this.m_dataPointIndex = dataPointIndex;
            int count = dataPointDef.DataValues.Count;

            this.m_dataValues = new object[count];
            bool flag = false;

            if (dataPointDef.Action != null)
            {
                flag = dataPointDef.Action.ResetObjectModelForDrillthroughContext(pc.ReportObjectModel, dataPointDef);
            }
            for (int i = 0; i < count; i++)
            {
                this.m_dataValues[i] = pc.ReportRuntime.EvaluateChartDataPointDataValueExpression(dataPointDef, dataPointDef.DataValues[i], chart.Name);
            }
            if (flag)
            {
                dataPointDef.Action.GetSelectedItemsForDrillthroughContext(pc.ReportObjectModel, dataPointDef);
            }
            if (dataPointDef.DataLabel != null)
            {
                this.m_dataLabelStyleAttributeValues = Chart.CreateStyle(pc, dataPointDef.DataLabel.StyleClass, chart.Name + ".DataLabel", owner.UniqueName);
                this.m_dataLabelValue = pc.ReportRuntime.EvaluateChartDataLabelValueExpression(dataPointDef, chart.Name, this.m_dataLabelStyleAttributeValues);
            }
            if (dataPointDef.Action != null)
            {
                this.m_action = ReportProcessing.RuntimeRICollection.CreateActionInstance(pc, dataPointDef, owner.UniqueName, chart.ObjectType, chart.Name + ".DataPoint");
            }
            this.m_styleAttributeValues = Chart.CreateStyle(pc, dataPointDef.StyleClass, chart.Name + ".DataPoint", owner.UniqueName);
            if (dataPointDef.MarkerStyleClass != null)
            {
                this.m_markerStyleAttributeValues = Chart.CreateStyle(pc, dataPointDef.MarkerStyleClass, chart.Name + ".DataPoint.Marker", owner.UniqueName);
            }
            if (dataPointDef.CustomProperties != null)
            {
                this.m_customPropertyInstances = dataPointDef.CustomProperties.EvaluateExpressions(chart.ObjectType, chart.Name, "DataPoint(" + (dataPointIndex + 1).ToString(CultureInfo.InvariantCulture) + ").", pc);
            }
            pc.ChunkManager.AddInstance(this, owner, pc.InPageSection);
        }
예제 #9
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);
     }
 }