コード例 #1
0
 internal DataValue(RenderingContext renderingContext, object chartDataValue)
 {
     m_isChartValue     = true;
     m_name             = new ReportStringProperty();
     m_value            = new ReportVariantProperty(isExpression: true);
     m_instance         = new ShimDataValueInstance(null, chartDataValue);
     m_renderingContext = renderingContext;
 }
コード例 #2
0
 internal Parameter(ActionDrillthrough actionDef, Microsoft.ReportingServices.ReportProcessing.ParameterValue parameterDef, ActionItemInstance actionInstance, int index)
 {
     m_name      = parameterDef.Name;
     m_value     = new ReportVariantProperty(parameterDef.Value);
     m_omit      = new ReportBoolProperty(parameterDef.Omit);
     m_actionDef = actionDef;
     m_instance  = new ParameterInstance(actionInstance, index);
 }
コード例 #3
0
        internal static object EvaluateBindingExpression(MapBindingFieldPair mapBindingFieldPair)
        {
            ReportVariantProperty bindingExpression = mapBindingFieldPair.BindingExpression;

            if (!bindingExpression.IsExpression)
            {
                return(bindingExpression.Value);
            }
            return(mapBindingFieldPair.Instance.BindingExpression);
        }
コード例 #4
0
 internal CustomProperty(RenderingContext renderingContext, Microsoft.ReportingServices.ReportProcessing.ExpressionInfo nameExpr, Microsoft.ReportingServices.ReportProcessing.ExpressionInfo valueExpr, string name, object value, TypeCode typeCode)
 {
     m_name  = new ReportStringProperty(nameExpr);
     m_value = new ReportVariantProperty(valueExpr);
     if (nameExpr.IsExpression || valueExpr.IsExpression)
     {
         m_instance = new CustomPropertyInstance(this, name, value, typeCode);
     }
     m_renderingContext = renderingContext;
 }
コード例 #5
0
 internal DataValue(IReportScope reportScope, RenderingContext renderingContext, Microsoft.ReportingServices.ReportIntermediateFormat.DataValue dataValue, bool isChart, IInstancePath instancePath, string objectName)
 {
     m_isChartValue     = isChart;
     m_instancePath     = instancePath;
     m_dataValue        = dataValue;
     m_name             = new ReportStringProperty(dataValue.Name);
     m_value            = new ReportVariantProperty(dataValue.Value);
     m_instance         = new InternalDataValueInstance(reportScope, this);
     m_renderingContext = renderingContext;
     m_objectName       = objectName;
 }
コード例 #6
0
        internal DataValue(RenderingContext renderingContext, Microsoft.ReportingServices.ReportRendering.DataValue dataValue)
        {
            m_isChartValue = false;
            string name  = dataValue?.Name;
            object value = dataValue?.Value;

            m_name             = new ReportStringProperty(isExpression: true, null, null);
            m_value            = new ReportVariantProperty(isExpression: true);
            m_instance         = new ShimDataValueInstance(name, value);
            m_renderingContext = renderingContext;
        }
コード例 #7
0
        private object EvaluateRuleDataValue()
        {
            ReportVariantProperty dataValue = m_mapRule.DataValue;
            object result = null;

            if (dataValue != null)
            {
                result = (dataValue.IsExpression ? m_mapRule.Instance.DataValue : dataValue.Value);
            }
            return(result);
        }
コード例 #8
0
 private void Init(Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo nameExpr, Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo valueExpr, string name, object value, TypeCode typeCode)
 {
     m_name  = new ReportStringProperty(nameExpr);
     m_value = new ReportVariantProperty(valueExpr);
     if (nameExpr.IsExpression || valueExpr.IsExpression)
     {
         m_instance = new CustomPropertyInstance(this, name, value, typeCode);
     }
     else
     {
         m_instance = null;
     }
 }
コード例 #9
0
 private object GetEndValue(Type fieldType)
 {
     if (!m_endValueEvaluated)
     {
         if (GetDistributionType() == MapRuleDistributionType.Custom)
         {
             MapBucketCollection mapBuckets = m_mapRule.MapBuckets;
             if (mapBuckets != null && mapBuckets.Count > 0)
             {
                 ReportVariantProperty endValue = mapBuckets[mapBuckets.Count - 1].EndValue;
                 if (endValue != null)
                 {
                     if (!endValue.IsExpression)
                     {
                         m_endValue = endValue.Value;
                     }
                     m_endValue = mapBuckets[mapBuckets.Count - 1].Instance.EndValue;
                 }
             }
         }
         if (m_endValue == null)
         {
             ReportVariantProperty endValue2 = m_mapRule.EndValue;
             if (endValue2 != null)
             {
                 if (!endValue2.IsExpression)
                 {
                     m_endValue = endValue2.Value;
                 }
                 m_endValue = m_mapRule.Instance.EndValue;
             }
         }
         if (m_endValue != null)
         {
             try
             {
                 m_endValue = Convert.ChangeType(m_endValue, fieldType, CultureInfo.InvariantCulture);
             }
             catch (Exception e)
             {
                 if (AsynchronousExceptionDetection.IsStoppingException(e))
                 {
                     throw;
                 }
                 m_endValue = null;
             }
         }
         m_endValueEvaluated = true;
     }
     return(m_endValue);
 }
コード例 #10
0
        protected string GetToValue(MapBucket bucket)
        {
            ReportVariantProperty endValue = bucket.EndValue;

            if (endValue != null)
            {
                if (!endValue.IsExpression)
                {
                    return(ConvertBucketValueToString(endValue.Value));
                }
                return(ConvertBucketValueToString(bucket.Instance.EndValue));
            }
            return("");
        }
コード例 #11
0
        protected string GetFromValue(MapBucket bucket)
        {
            ReportVariantProperty startValue = bucket.StartValue;

            if (startValue != null)
            {
                if (!startValue.IsExpression)
                {
                    return(ConvertBucketValueToString(startValue.Value));
                }
                return(ConvertBucketValueToString(bucket.Instance.StartValue));
            }
            return("");
        }
コード例 #12
0
        string IBaseImage.GetValueAsString(out List <string> fieldsUsedInValue, out bool errOccurred)
        {
            fieldsUsedInValue = null;
            ReportVariantProperty value = Value;

            errOccurred = false;
            if (!value.IsExpression)
            {
                object value2 = value.Value;
                if (value2 is string)
                {
                    return((string)value2);
                }
                return(null);
            }
            return(m_defObject.EvaluateStringValue(Instance.ReportScopeInstance, m_gaugePanel.RenderingContext.OdpContext, out errOccurred));
        }
コード例 #13
0
        internal void ConstructParameterDefinition()
        {
            ParameterInstance instance = Instance;

            Global.Tracer.Assert(instance != null);
            if (instance.Value != null)
            {
                m_parameterDef.Value = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression((string)instance.Value);
            }
            else
            {
                m_parameterDef.Value = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
            }
            m_value = null;
            if (instance.IsOmitAssined)
            {
                m_parameterDef.Omit = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression(instance.Omit);
            }
            else
            {
                m_parameterDef.Omit = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
            }
            m_omit = null;
        }
コード例 #14
0
 internal List <string> GetFieldsUsedInValues()
 {
     if (!m_fieldsUsedInValuesEvaluated)
     {
         m_fieldsUsedInValuesEvaluated = true;
         Microsoft.ReportingServices.ReportIntermediateFormat.ChartDataPoint dataPointDef = m_chartDataPointValuesDef.ChartDataPoint.DataPointDef;
         if (dataPointDef.Action != null && dataPointDef.Action.TrackFieldsUsedInValueExpression)
         {
             m_fieldsUsedInValues = new List <string>();
             ObjectModelImpl reportObjectModel = m_chartDataPointValuesDef.ChartDef.RenderingContext.OdpContext.ReportObjectModel;
             reportObjectModel.ResetFieldsUsedInExpression();
             ReportVariantProperty x = m_chartDataPointValuesDef.X;
             if (x != null && x.IsExpression)
             {
                 _ = X;
             }
             x = m_chartDataPointValuesDef.Y;
             if (x != null && x.IsExpression)
             {
                 _ = Y;
             }
             x = m_chartDataPointValuesDef.Size;
             if (x != null && x.IsExpression)
             {
                 _ = Size;
             }
             x = m_chartDataPointValuesDef.High;
             if (x != null && x.IsExpression)
             {
                 _ = High;
             }
             x = m_chartDataPointValuesDef.Low;
             if (x != null && x.IsExpression)
             {
                 _ = Low;
             }
             x = m_chartDataPointValuesDef.Start;
             if (x != null && x.IsExpression)
             {
                 _ = Start;
             }
             x = m_chartDataPointValuesDef.End;
             if (x != null && x.IsExpression)
             {
                 _ = End;
             }
             x = m_chartDataPointValuesDef.Mean;
             if (x != null && x.IsExpression)
             {
                 _ = Mean;
             }
             x = m_chartDataPointValuesDef.Median;
             if (x != null && x.IsExpression)
             {
                 _ = Median;
             }
             reportObjectModel.AddFieldsUsedInExpression(m_fieldsUsedInValues);
         }
     }
     return(m_fieldsUsedInValues);
 }