Exemple #1
0
        protected void SetRuleFieldName()
        {
            ReportVariantProperty dataValue = this.m_mapRule.DataValue;

            if (dataValue == null)
            {
                this.m_ruleFieldName  = RuleMapper.m_distinctBucketFieldName;
                this.m_coreRule.Field = this.m_ruleFieldName;
                this.m_fieldNameBased = true;
            }
            else if (this.m_mapVectorLayer.MapDataRegion == null)
            {
                object obj = this.EvaluateRuleDataValue();
                if (obj is string)
                {
                    string text = (string)obj;
                    if (text.StartsWith("#", StringComparison.Ordinal))
                    {
                        this.m_ruleFieldName  = SpatialDataMapper.GetUniqueFieldName(this.m_mapVectorLayer.Name, text.Remove(0, 1));
                        this.m_coreRule.Field = this.m_ruleFieldName;
                        this.m_fieldNameBased = true;
                    }
                }
            }
        }
Exemple #2
0
 public DataValue(RenderingContext renderingContext, object chartDataValue)
 {
     this.m_isChartValue     = true;
     this.m_name             = new ReportStringProperty();
     this.m_value            = new ReportVariantProperty(true);
     this.m_instance         = new ShimDataValueInstance(null, chartDataValue);
     this.m_renderingContext = renderingContext;
 }
 public Parameter(ActionDrillthrough actionDef, AspNetCore.ReportingServices.ReportProcessing.ParameterValue parameterDef, ActionItemInstance actionInstance, int index)
 {
     this.m_name      = parameterDef.Name;
     this.m_value     = new ReportVariantProperty(parameterDef.Value);
     this.m_omit      = new ReportBoolProperty(parameterDef.Omit);
     this.m_actionDef = actionDef;
     this.m_instance  = new ParameterInstance(actionInstance, index);
 }
        public static object EvaluateBindingExpression(MapBindingFieldPair mapBindingFieldPair)
        {
            ReportVariantProperty bindingExpression = mapBindingFieldPair.BindingExpression;

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

            this.m_name             = new ReportStringProperty(true, null, null);
            this.m_value            = new ReportVariantProperty(true);
            this.m_instance         = new ShimDataValueInstance(name, value);
            this.m_renderingContext = renderingContext;
        }
Exemple #8
0
        private object EvaluateRuleDataValue()
        {
            ReportVariantProperty dataValue = this.m_mapRule.DataValue;
            object result = null;

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

            if (endValue != null)
            {
                if (!endValue.IsExpression)
                {
                    return(this.ConvertBucketValueToString(endValue.Value));
                }
                return(this.ConvertBucketValueToString(bucket.Instance.EndValue));
            }
            return("");
        }
Exemple #12
0
        protected string GetFromValue(MapBucket bucket)
        {
            ReportVariantProperty startValue = bucket.StartValue;

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

            errOccurred = false;
            if (!value.IsExpression)
            {
                object value2 = value.Value;
                if (value2 is string)
                {
                    return((string)value2);
                }
                return(null);
            }
            return(this.m_defObject.EvaluateStringValue(this.Instance.ReportScopeInstance, this.m_map.RenderingContext.OdpContext, out errOccurred));
        }
        public void ConstructParameterDefinition()
        {
            ParameterInstance instance = this.Instance;

            Global.Tracer.Assert(instance != null);
            if (instance.Value != null)
            {
                this.m_parameterDef.Value = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression((string)instance.Value);
            }
            else
            {
                this.m_parameterDef.Value = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
            }
            this.m_value = null;
            if (instance.IsOmitAssined)
            {
                this.m_parameterDef.Omit = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression(instance.Omit);
            }
            else
            {
                this.m_parameterDef.Omit = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
            }
            this.m_omit = null;
        }
Exemple #15
0
 public List <string> GetFieldsUsedInValues()
 {
     if (!this.m_fieldsUsedInValuesEvaluated)
     {
         this.m_fieldsUsedInValuesEvaluated = true;
         AspNetCore.ReportingServices.ReportIntermediateFormat.ChartDataPoint dataPointDef = this.m_chartDataPointValuesDef.ChartDataPoint.DataPointDef;
         if (dataPointDef.Action != null && dataPointDef.Action.TrackFieldsUsedInValueExpression)
         {
             this.m_fieldsUsedInValues = new List <string>();
             ObjectModelImpl reportObjectModel = this.m_chartDataPointValuesDef.ChartDef.RenderingContext.OdpContext.ReportObjectModel;
             reportObjectModel.ResetFieldsUsedInExpression();
             ReportVariantProperty x = this.m_chartDataPointValuesDef.X;
             if (x != null && x.IsExpression)
             {
                 object x2 = this.X;
             }
             x = this.m_chartDataPointValuesDef.Y;
             if (x != null && x.IsExpression)
             {
                 object y = this.Y;
             }
             x = this.m_chartDataPointValuesDef.Size;
             if (x != null && x.IsExpression)
             {
                 object size = this.Size;
             }
             x = this.m_chartDataPointValuesDef.High;
             if (x != null && x.IsExpression)
             {
                 object high = this.High;
             }
             x = this.m_chartDataPointValuesDef.Low;
             if (x != null && x.IsExpression)
             {
                 object low = this.Low;
             }
             x = this.m_chartDataPointValuesDef.Start;
             if (x != null && x.IsExpression)
             {
                 object start = this.Start;
             }
             x = this.m_chartDataPointValuesDef.End;
             if (x != null && x.IsExpression)
             {
                 object end = this.End;
             }
             x = this.m_chartDataPointValuesDef.Mean;
             if (x != null && x.IsExpression)
             {
                 object mean = this.Mean;
             }
             x = this.m_chartDataPointValuesDef.Median;
             if (x != null && x.IsExpression)
             {
                 object median = this.Median;
             }
             reportObjectModel.AddFieldsUsedInExpression(this.m_fieldsUsedInValues);
         }
     }
     return(this.m_fieldsUsedInValues);
 }