コード例 #1
0
 internal CustomReportItemHeadingInstance(ReportProcessing.ProcessingContext pc, int headingCellIndex, CustomReportItemHeading headingDef, VariantList groupExpressionValues, int recursiveLevel)
 {
     if (headingDef.InnerHeadings != null)
     {
         m_subHeadingInstances = new CustomReportItemHeadingInstanceList();
     }
     m_headingDef       = headingDef;
     m_headingCellIndex = headingCellIndex;
     if (groupExpressionValues != null)
     {
         m_groupExpressionValues = new VariantList(groupExpressionValues.Count);
         for (int i = 0; i < groupExpressionValues.Count; i++)
         {
             if (groupExpressionValues[i] == null || DBNull.Value == groupExpressionValues[i])
             {
                 m_groupExpressionValues.Add(null);
             }
             else
             {
                 m_groupExpressionValues.Add(groupExpressionValues[i]);
             }
         }
     }
     if (headingDef.Grouping != null && headingDef.Grouping.GroupLabel != null)
     {
         m_label = pc.NavigationInfo.RegisterLabel(pc.ReportRuntime.EvaluateGroupingLabelExpression(headingDef.Grouping, headingDef.DataRegionDef.ObjectType, headingDef.DataRegionDef.Name));
     }
     if (headingDef.CustomProperties != null)
     {
         m_customPropertyInstances = headingDef.CustomProperties.EvaluateExpressions(headingDef.DataRegionDef.ObjectType, headingDef.DataRegionDef.Name, "DataGrouping.", pc);
     }
     m_recursiveLevel = recursiveLevel;
 }
コード例 #2
0
        internal CustomReportItemCellInstance(int rowIndex, int colIndex, CustomReportItem definition, ReportProcessing.ProcessingContext pc)
        {
            m_rowIndex    = rowIndex;
            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(dataValueCRIList != null);
            m_dataValueInstances = dataValueCRIList.EvaluateExpressions(definition.ObjectType, definition.Name, null, dataValueCRIList.RDLRowIndex, dataValueCRIList.RDLColumnIndex, pc);
            Global.Tracer.Assert(m_dataValueInstances != null);
        }
コード例 #3
0
        private void ConstructorHelper(ReportProcessing.ProcessingContext pc, ReportItem reportItemDef, ReportItemInstance owner)
        {
            m_reportItemDef = reportItemDef;
            Style styleClass = reportItemDef.StyleClass;

            if (styleClass != null && styleClass.ExpressionList != null && 0 < styleClass.ExpressionList.Count)
            {
                m_styleAttributeValues = new object[styleClass.ExpressionList.Count];
            }
            ReportProcessing.RuntimeRICollection.EvalReportItemAttr(reportItemDef, owner, this, pc);
            if (reportItemDef.CustomProperties != null)
            {
                m_customPropertyInstances = reportItemDef.CustomProperties.EvaluateExpressions(reportItemDef.ObjectType, reportItemDef.Name, null, pc);
            }
        }
コード例 #4
0
 internal TableGroupInstanceInfo(ReportProcessing.ProcessingContext pc, TableGroup tableGroupDef, TableGroupInstance owner)
 {
     if (pc.ShowHideType != 0)
     {
         m_startHidden = pc.ProcessReceiver(owner.UniqueName, tableGroupDef.Visibility, tableGroupDef.ExprHost, tableGroupDef.DataRegionDef.ObjectType, tableGroupDef.DataRegionDef.Name);
     }
     tableGroupDef.StartHidden = m_startHidden;
     if (tableGroupDef.Grouping.GroupLabel != null)
     {
         m_label = pc.NavigationInfo.RegisterLabel(pc.ReportRuntime.EvaluateGroupingLabelExpression(tableGroupDef.Grouping, tableGroupDef.DataRegionDef.ObjectType, tableGroupDef.DataRegionDef.Name));
     }
     if (tableGroupDef.Grouping.CustomProperties != null)
     {
         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
        internal DataValueInstanceList EvaluateExpressions(ObjectType objectType, string objectName, string prefix, int rowIndex, int cellIndex, ReportProcessing.ProcessingContext pc)
        {
            int count = 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, 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(dataValue.Value != null);
                    if (ExpressionInfo.Types.Constant != dataValue.Value.Type)
                    {
                        dataValueInstance.Value = pc.ReportRuntime.EvaluateDataValueValueExpression(dataValue, objectType, objectName, CreatePropertyNameString(prefix, rowIndex + 1, cellIndex + 1, i + 1) + ".Value");
                    }
                }
                dataValueInstanceList.Add(dataValueInstance);
            }
            return(dataValueInstanceList);
        }
コード例 #6
0
        internal 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 == groupExpressionValues[0])
                    {
                        m_groupExpressionValue = null;
                    }
                    else
                    {
                        m_groupExpressionValue = groupExpressionValues[0];
                    }
                }
            }
            if (0 < reportItems.Count && !reportItems.IsReportItemComputed(reportItemDefIndex))
            {
                m_contentUniqueNames = NonComputedUniqueNames.CreateNonComputedUniqueNames(pc, reportItems[reportItemDefIndex]);
            }
            nonComputedUniqueNames = m_contentUniqueNames;
            m_headingCellIndex     = headingCellIndex;
            if (!isSubtotal && pc.ShowHideType != 0)
            {
                m_startHidden = pc.ProcessReceiver(owner.UniqueName, matrixHeadingDef.Visibility, matrixHeadingDef.ExprHost, matrixHeadingDef.DataRegionDef.ObjectType, matrixHeadingDef.DataRegionDef.Name);
            }
            if (matrixHeadingDef.Grouping != null && matrixHeadingDef.Grouping.GroupLabel != null)
            {
                m_label = pc.NavigationInfo.RegisterLabel(pc.ReportRuntime.EvaluateGroupingLabelExpression(matrixHeadingDef.Grouping, matrixHeadingDef.DataRegionDef.ObjectType, matrixHeadingDef.DataRegionDef.Name));
            }
            if (matrixHeadingDef.Grouping != null && matrixHeadingDef.Grouping.CustomProperties != null)
            {
                m_customPropertyInstances = matrixHeadingDef.Grouping.CustomProperties.EvaluateExpressions(matrixHeadingDef.DataRegionDef.ObjectType, matrixHeadingDef.DataRegionDef.Name, matrixHeadingDef.Grouping.Name + ".", pc);
            }
            matrixHeadingDef.StartHidden = m_startHidden;
        }
コード例 #7
0
        internal AxisInstance(ReportProcessing.ProcessingContext pc, Chart chart, Axis axisDef, Axis.Mode mode)
        {
            m_uniqueName = pc.CreateUniqueName();
            string text = mode.ToString();

            if (axisDef.Title != null)
            {
                m_title = new ChartTitleInstance(pc, chart, axisDef.Title, text);
            }
            m_styleAttributeValues = Chart.CreateStyle(pc, axisDef.StyleClass, chart.Name + "." + text, m_uniqueName);
            if (axisDef.MajorGridLines != null)
            {
                m_majorGridLinesStyleAttributeValues = Chart.CreateStyle(pc, axisDef.MajorGridLines.StyleClass, chart.Name + "." + text + ".MajorGridLines", m_uniqueName);
            }
            if (axisDef.MinorGridLines != null)
            {
                m_minorGridLinesStyleAttributeValues = Chart.CreateStyle(pc, axisDef.MinorGridLines.StyleClass, chart.Name + "." + text + ".MinorGridLines", m_uniqueName);
            }
            if (axisDef.Min != null && ExpressionInfo.Types.Constant != axisDef.Min.Type)
            {
                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)
            {
                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)
            {
                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)
            {
                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)
            {
                m_minorIntervalValue = pc.ReportRuntime.EvaluateChartAxisValueExpression(axisDef.ExprHost, axisDef.MinorInterval, chart.Name, text + ".MinorInterval", Axis.ExpressionType.MinorInterval);
            }
            if (axisDef.CustomProperties != null)
            {
                m_customPropertyInstances = axisDef.CustomProperties.EvaluateExpressions(chart.ObjectType, chart.Name, text + ".", pc);
            }
        }
コード例 #8
0
        internal ChartDataPointInstanceInfo(ReportProcessing.ProcessingContext pc, Chart chart, ChartDataPoint dataPointDef, int dataPointIndex, ChartDataPointInstance owner)
        {
            m_dataPointIndex = dataPointIndex;
            int count = dataPointDef.DataValues.Count;

            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++)
            {
                m_dataValues[i] = pc.ReportRuntime.EvaluateChartDataPointDataValueExpression(dataPointDef, dataPointDef.DataValues[i], chart.Name);
            }
            if (flag)
            {
                dataPointDef.Action.GetSelectedItemsForDrillthroughContext(pc.ReportObjectModel, dataPointDef);
            }
            if (dataPointDef.DataLabel != null)
            {
                m_dataLabelStyleAttributeValues = Chart.CreateStyle(pc, dataPointDef.DataLabel.StyleClass, chart.Name + ".DataLabel", owner.UniqueName);
                m_dataLabelValue = pc.ReportRuntime.EvaluateChartDataLabelValueExpression(dataPointDef, chart.Name, m_dataLabelStyleAttributeValues);
            }
            if (dataPointDef.Action != null)
            {
                m_action = ReportProcessing.RuntimeRICollection.CreateActionInstance(pc, dataPointDef, owner.UniqueName, chart.ObjectType, chart.Name + ".DataPoint");
            }
            m_styleAttributeValues = Chart.CreateStyle(pc, dataPointDef.StyleClass, chart.Name + ".DataPoint", owner.UniqueName);
            if (dataPointDef.MarkerStyleClass != null)
            {
                m_markerStyleAttributeValues = Chart.CreateStyle(pc, dataPointDef.MarkerStyleClass, chart.Name + ".DataPoint.Marker", owner.UniqueName);
            }
            if (dataPointDef.CustomProperties != null)
            {
                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
 internal ChartHeadingInstanceInfo(ReportProcessing.ProcessingContext pc, int headingCellIndex, ChartHeading chartHeadingDef, int labelIndex, VariantList groupExpressionValues)
 {
     m_headingCellIndex = headingCellIndex;
     if (chartHeadingDef.ChartGroupExpression)
     {
         if (groupExpressionValues == null || DBNull.Value == groupExpressionValues[0])
         {
             m_groupExpressionValue = null;
         }
         else
         {
             m_groupExpressionValue = groupExpressionValues[0];
         }
     }
     if (chartHeadingDef.Labels != null)
     {
         ExpressionInfo expressionInfo = chartHeadingDef.Labels[labelIndex];
         if (expressionInfo != null)
         {
             if (chartHeadingDef.Grouping != null)
             {
                 m_headingLabel = pc.ReportRuntime.EvaluateChartDynamicHeadingLabelExpression(chartHeadingDef, expressionInfo, chartHeadingDef.DataRegionDef.Name);
             }
             else
             {
                 m_headingLabel = pc.ReportRuntime.EvaluateChartStaticHeadingLabelExpression(chartHeadingDef, expressionInfo, chartHeadingDef.DataRegionDef.Name);
             }
         }
     }
     if (chartHeadingDef.Grouping == null)
     {
         m_staticGroupingIndex = labelIndex;
     }
     else if (chartHeadingDef.Grouping.CustomProperties != null)
     {
         m_customPropertyInstances = chartHeadingDef.Grouping.CustomProperties.EvaluateExpressions(chartHeadingDef.DataRegionDef.ObjectType, chartHeadingDef.DataRegionDef.Name, chartHeadingDef.Grouping.Name + ".", pc);
     }
 }