Пример #1
0
 private void SetValue(object value, bool internalSet, out bool succeeded)
 {
     succeeded = false;
     if (!internalSet)
     {
         if (this.IsReportVariable && this.m_variableDef.Writable)
         {
             this.m_result = new AspNetCore.ReportingServices.RdlExpressions.VariantResult(false, value);
             bool flag = this.m_reportRT.ProcessSerializableResult(true, ref this.m_result);
             if (this.m_result.ErrorOccurred)
             {
                 if (flag)
                 {
                     ((IErrorContext)this.m_reportRT).Register(ProcessingErrorCode.rsVariableTypeNotSerializable, Severity.Error, this.m_parentObjectType, this.m_parentObjectName, this.m_variableDef.GetPropertyName(), new string[0]);
                 }
             }
             else
             {
                 this.m_reportRT.ReportObjectModel.OdpContext.StoreUpdatedVariableValue(this.m_indexInCollection, value);
                 succeeded           = true;
                 this.m_value        = value;
                 this.m_isValueReady = true;
             }
         }
     }
     else
     {
         succeeded           = true;
         this.m_value        = value;
         this.m_isValueReady = true;
     }
 }
Пример #2
0
 public void ResetAll(AspNetCore.ReportingServices.RdlExpressions.VariantResult aResult)
 {
     foreach (ReportItemImpl value in this.m_collection.Values)
     {
         value.Reset(aResult);
     }
 }
        public bool EvaluateParameters(out object[] values, out DataFieldStatus fieldStatus)
        {
            bool flag = false;

            fieldStatus = DataFieldStatus.None;
            values      = new object[this.m_aggregateDef.Expressions.Length];
            for (int i = 0; i < this.m_aggregateDef.Expressions.Length; i++)
            {
                try
                {
                    AspNetCore.ReportingServices.RdlExpressions.VariantResult variantResult = this.m_reportRT.EvaluateAggregateVariantOrBinaryParamExpr(this.m_aggregateDef, i, this);
                    values[i] = variantResult.Value;
                    flag     |= variantResult.ErrorOccurred;
                    if (variantResult.FieldStatus != 0)
                    {
                        fieldStatus = variantResult.FieldStatus;
                    }
                }
                catch (ReportProcessingException_MissingAggregateDependency)
                {
                    if (this.m_aggregateDef.AggregateType == DataAggregateInfo.AggregateTypes.Previous)
                    {
                        values[i]   = null;
                        fieldStatus = DataFieldStatus.None;
                        return(false);
                    }
                    Global.Tracer.Assert(false, "Unfulfilled aggregate dependency outside of a previous");
                    throw;
                }
            }
            return(flag);
        }
Пример #4
0
 private object EvaluateFilterValue(AspNetCore.ReportingServices.ReportIntermediateFormat.Filter filterDef)
 {
     Global.Tracer.Assert(filterDef.Values != null, "(filterDef.Values != null)");
     Global.Tracer.Assert(filterDef.Values.Count > 0, "(filterDef.Values.Count > 0)");
     AspNetCore.ReportingServices.RdlExpressions.VariantResult variantResult = this.m_processingContext.ReportRuntime.EvaluateFilterVariantValue(filterDef, 0, this.m_objectType, this.m_objectName);
     this.ThrowIfErrorOccurred("FilterValue", variantResult.ErrorOccurred, variantResult.FieldStatus);
     return(variantResult.Value);
 }
Пример #5
0
 private void CheckExprResultError(AspNetCore.ReportingServices.RdlExpressions.VariantResult result)
 {
     if (!result.ErrorOccurred)
     {
         return;
     }
     throw new ReportProcessingException_InvalidOperationException();
 }
        public void NextRow()
        {
            long           streamOffset = this.m_odpContext.ReportObjectModel.FieldsImpl.StreamOffset;
            int            num          = -1;
            CommonRowCache tablixProcessingLookupRowCache = this.m_odpContext.TablixProcessingLookupRowCache;

            if (this.m_mustBufferAllRows)
            {
                num = tablixProcessingLookupRowCache.AddRow(RuntimeDataTablixObj.SaveData(this.m_odpContext));
                if (this.m_firstRowCacheIndex == -1)
                {
                    this.m_firstRowCacheIndex = num;
                }
            }
            IScalabilityCache tablixProcessingScalabilityCache = this.m_odpContext.TablixProcessingScalabilityCache;

            for (int i = 0; i < this.m_dataSet.LookupDestinationInfos.Count; i++)
            {
                LookupDestinationInfo lookupDestinationInfo = this.m_dataSet.LookupDestinationInfos[i];
                LookupObjResult       lookupObjResult       = this.m_dataSetInstance.LookupResults[i];
                if (!lookupObjResult.ErrorOccured)
                {
                    AspNetCore.ReportingServices.RdlExpressions.VariantResult variantResult = lookupDestinationInfo.EvaluateDestExpr(this.m_odpContext, lookupObjResult);
                    if (variantResult.ErrorOccurred)
                    {
                        lookupObjResult.DataFieldStatus = variantResult.FieldStatus;
                    }
                    else
                    {
                        object      value       = variantResult.Value;
                        LookupTable lookupTable = lookupObjResult.GetLookupTable(this.m_odpContext);
                        try
                        {
                            LookupMatches lookupMatches = default(LookupMatches);
                            IDisposable   disposable    = default(IDisposable);
                            if (!lookupTable.TryGetAndPinValue(value, out lookupMatches, out disposable))
                            {
                                lookupMatches = ((!lookupDestinationInfo.UsedInSameDataSetTablixProcessing) ? new LookupMatches() : new LookupMatchesWithRows());
                                disposable    = lookupTable.AddAndPin(value, lookupMatches);
                            }
                            if (lookupDestinationInfo.IsMultiValue || !lookupMatches.HasRow)
                            {
                                lookupMatches.AddRow(streamOffset, num, tablixProcessingScalabilityCache);
                            }
                            disposable.Dispose();
                        }
                        catch (ReportProcessingException_SpatialTypeComparisonError reportProcessingException_SpatialTypeComparisonError)
                        {
                            throw new ReportProcessingException(this.m_lookupOwner.RegisterSpatialElementComparisonError(reportProcessingException_SpatialTypeComparisonError.Type));
                        }
                    }
                }
            }
            if (!this.m_mustBufferAllRows)
            {
                this.m_lookupOwner.PostLookupNextRow();
            }
        }
 public override object EvaluateValidValueLabelExpr(IParameterDef aParamDef, int aIndex)
 {
     AspNetCore.ReportingServices.RdlExpressions.VariantResult variantResult = this.GetOnDemandContext().ReportRuntime.EvaluateParamValidValueLabel((AspNetCore.ReportingServices.ReportIntermediateFormat.ParameterDef)aParamDef, aIndex);
     if (variantResult.ErrorOccurred)
     {
         throw new ReportProcessingException(ErrorCode.rsReportParameterProcessingError, aParamDef.Name);
     }
     return(variantResult.Value);
 }
 public string GetFormattedValue(AspNetCore.ReportingServices.RdlExpressions.VariantResult originalValue, IReportScopeInstance reportScopeInstance, OnDemandProcessingContext context)
 {
     context.SetupContext(this.InstancePath, reportScopeInstance);
     if (originalValue.ErrorOccurred)
     {
         return(RPRes.rsExpressionErrorValue);
     }
     if (originalValue.Value != null)
     {
         return(Formatter.Format(originalValue.Value, ref this.m_formatter, base.m_chart.StyleClass, base.m_styleClass, context, AspNetCore.ReportingServices.ReportProcessing.ObjectType.Chart, base.m_chart.Name));
     }
     return(null);
 }
 private void Parse()
 {
     if (!this.m_parsed)
     {
         try
         {
             this.m_parsed = true;
             this.m_paragraphDef.CriGenerationPhase = ReportElement.CriGenerationPhases.Definition;
             this.m_textRunDef.CriGenerationPhase   = ReportElement.CriGenerationPhases.Definition;
             ReportEnumProperty <MarkupType> markupType = this.m_textRunDef.MarkupType;
             MarkupType     markupType2    = (!markupType.IsExpression) ? markupType.Value : this.m_textRunDef.Instance.MarkupType;
             RichTextParser richTextParser = null;
             MarkupType     markupType3    = markupType2;
             if (markupType3 == MarkupType.HTML)
             {
                 richTextParser = new HtmlParser(this.m_multipleParagraphsAllowed, this, this);
                 InternalTextRunInstance internalTextRunInstance = (InternalTextRunInstance)this.m_textRunDef.Instance;
                 AspNetCore.ReportingServices.RdlExpressions.VariantResult originalValue = internalTextRunInstance.GetOriginalValue();
                 if (!originalValue.ErrorOccurred && originalValue.TypeCode != 0)
                 {
                     try
                     {
                         string richText = (originalValue.TypeCode != TypeCode.String) ? internalTextRunInstance.TextRunDef.FormatTextRunValue(originalValue.Value, originalValue.TypeCode, this.m_textRunDef.RenderingContext.OdpContext) : (originalValue.Value as string);
                         this.m_compiledParagraphCollection = (CompiledParagraphInstanceCollection)richTextParser.Parse(richText);
                     }
                     catch (Exception ex)
                     {
                         this.m_errorContext.Register(ProcessingErrorCode.rsInvalidRichTextParseFailed, Severity.Warning, "TextRun", internalTextRunInstance.TextRunDef.Name, ex.Message);
                         this.m_parseErrorOccured = true;
                         ICompiledTextRunInstance compiledTextRunInstance = this.CreateSingleTextRun();
                         compiledTextRunInstance.Value = RPRes.rsRichTextParseErrorValue;
                     }
                 }
                 else
                 {
                     ICompiledTextRunInstance compiledTextRunInstance2 = this.CreateSingleTextRun();
                     if (originalValue.ErrorOccurred)
                     {
                         compiledTextRunInstance2.Value = RPRes.rsExpressionErrorValue;
                     }
                 }
             }
         }
         finally
         {
             this.m_textRunDef.CriGenerationPhase   = ReportElement.CriGenerationPhases.None;
             this.m_paragraphDef.CriGenerationPhase = ReportElement.CriGenerationPhases.None;
         }
     }
 }
Пример #10
0
        public string GetFormattedStringFromValue(ref AspNetCore.ReportingServices.RdlExpressions.VariantResult result, OnDemandProcessingContext context)
        {
            string result2 = null;

            if (result.ErrorOccurred)
            {
                result2 = RPRes.rsExpressionErrorValue;
            }
            else if (result.Value != null)
            {
                result2 = Formatter.Format(result.Value, ref this.m_formatter, base.StyleClass, (Style)null, context, this.ObjectType, base.Name);
            }
            return(result2);
        }
Пример #11
0
        public string FormatTextRunValue(AspNetCore.ReportingServices.RdlExpressions.VariantResult textRunResult, OnDemandProcessingContext context)
        {
            string result = null;

            if (textRunResult.ErrorOccurred)
            {
                result = RPRes.rsExpressionErrorValue;
            }
            else if (textRunResult.Value != null)
            {
                result = this.FormatTextRunValue(textRunResult.Value, textRunResult.TypeCode, null, context);
            }
            return(result);
        }
Пример #12
0
        public string FormatText(AspNetCore.ReportingServices.RdlExpressions.VariantResult result, OnDemandProcessingContext context)
        {
            string result2 = null;

            if (result.ErrorOccurred)
            {
                result2 = RPRes.rsExpressionErrorValue;
            }
            else if (result.Value != null)
            {
                result2 = Formatter.Format(result.Value, ref this.m_formatter, base.m_gaugePanel.StyleClass, base.m_styleClass, context, AspNetCore.ReportingServices.ReportProcessing.ObjectType.GaugePanel, base.m_gaugePanel.Name);
            }
            return(result2);
        }
Пример #13
0
 private object GetResult(bool fromValue)
 {
     if (fromValue && !this.VariableInScope)
     {
         return(null);
     }
     if (!this.m_isValueReady)
     {
         if (this.m_isVisited)
         {
             ProcessingErrorCode code = (ProcessingErrorCode)(this.IsReportVariable ? 346 : 347);
             ((IErrorContext)this.m_reportRT).Register(code, Severity.Error, this.m_parentObjectType, this.m_parentObjectName, this.m_variableDef.GetPropertyName(), new string[0]);
             throw new ReportProcessingException(this.m_reportRT.RuntimeErrorContext.Messages);
         }
         this.m_isVisited = true;
         bool       variableReferenceMode = this.m_reportRT.VariableReferenceMode;
         ObjectType objectType            = this.m_reportRT.ObjectType;
         string     objectName            = this.m_reportRT.ObjectName;
         string     propertyName          = this.m_reportRT.PropertyName;
         bool       unfulfilledDependency = this.m_reportRT.UnfulfilledDependency;
         IScope     currentScope          = this.m_reportRT.CurrentScope;
         this.m_reportRT.VariableReferenceMode = true;
         this.m_reportRT.UnfulfilledDependency = false;
         this.m_result = this.m_reportRT.EvaluateVariableValueExpression(this.m_variableDef, this.m_exprHost, this.m_parentObjectType, this.m_parentObjectName, this.IsReportVariable);
         bool unfulfilledDependency2 = this.m_reportRT.UnfulfilledDependency;
         this.m_reportRT.UnfulfilledDependency |= unfulfilledDependency;
         this.m_reportRT.VariableReferenceMode  = variableReferenceMode;
         this.m_reportRT.CurrentScope           = currentScope;
         this.m_reportRT.ObjectType             = objectType;
         this.m_reportRT.ObjectName             = objectName;
         this.m_reportRT.PropertyName           = propertyName;
         if (this.m_result.ErrorOccurred)
         {
             throw new ReportProcessingException(this.m_reportRT.RuntimeErrorContext.Messages);
         }
         if (unfulfilledDependency2 && fromValue)
         {
             this.m_value        = null;
             this.m_isValueReady = false;
         }
         else
         {
             this.m_value        = this.m_result.Value;
             this.m_isValueReady = true;
         }
         this.m_isVisited = false;
     }
     return(this.m_value);
 }
Пример #14
0
 private object[] EvaluateFilterValues(AspNetCore.ReportingServices.ReportIntermediateFormat.Filter filterDef)
 {
     if (filterDef.Values != null)
     {
         object[] array = new object[filterDef.Values.Count];
         for (int num = filterDef.Values.Count - 1; num >= 0; num--)
         {
             AspNetCore.ReportingServices.RdlExpressions.VariantResult variantResult = this.m_processingContext.ReportRuntime.EvaluateFilterVariantValue(filterDef, num, this.m_objectType, this.m_objectName);
             this.ThrowIfErrorOccurred("FilterValues", variantResult.ErrorOccurred, variantResult.FieldStatus);
             array[num] = variantResult.Value;
         }
         return(array);
     }
     return(null);
 }
Пример #15
0
        public string EvaluateText(IReportScopeInstance reportScopeInstance, OnDemandProcessingContext context)
        {
            context.SetupContext(base.m_gaugePanel, reportScopeInstance);
            AspNetCore.ReportingServices.RdlExpressions.VariantResult variantResult = context.ReportRuntime.EvaluateCustomLabelTextExpression(this, base.m_gaugePanel.Name);
            string result = null;

            if (variantResult.ErrorOccurred)
            {
                result = RPRes.rsExpressionErrorValue;
            }
            else if (variantResult.Value != null)
            {
                result = Formatter.Format(variantResult.Value, ref this.m_formatter, base.m_gaugePanel.StyleClass, base.m_styleClass, context, AspNetCore.ReportingServices.ReportProcessing.ObjectType.GaugePanel, base.m_gaugePanel.Name);
            }
            return(result);
        }
Пример #16
0
        public string EvaluateToolTip(IReportScopeInstance reportScopeInstance, OnDemandProcessingContext context)
        {
            context.SetupContext(this, reportScopeInstance);
            AspNetCore.ReportingServices.RdlExpressions.VariantResult variantResult = context.ReportRuntime.EvaluateChartDataPointToolTipExpression(this, base.m_dataRegionDef.Name);
            string result = null;

            if (variantResult.ErrorOccurred)
            {
                result = RPRes.rsExpressionErrorValue;
            }
            else if (variantResult.Value != null)
            {
                result = Formatter.Format(variantResult.Value, ref this.m_formatter, base.m_dataRegionDef.StyleClass, this.m_styleClass, context, this.ObjectType, this.Name);
            }
            return(result);
        }
Пример #17
0
        public string EvaluateCaption(IReportScopeInstance instance, OnDemandProcessingContext context)
        {
            context.SetupContext(base.m_chart, instance);
            AspNetCore.ReportingServices.RdlExpressions.VariantResult variantResult = context.ReportRuntime.EvaluateChartTitleCaptionExpression(this, base.Name, "Caption");
            string result = null;

            if (variantResult.ErrorOccurred)
            {
                result = RPRes.rsExpressionErrorValue;
            }
            else if (variantResult.Value != null)
            {
                result = Formatter.Format(variantResult.Value, ref this.m_formatter, base.m_chart.StyleClass, base.m_styleClass, context, base.ObjectType, base.Name);
            }
            return(result);
        }
        public string EvaluateToolTip(IReportScopeInstance reportScopeInstance, OnDemandProcessingContext context)
        {
            context.SetupContext(this.InstancePath, reportScopeInstance);
            AspNetCore.ReportingServices.RdlExpressions.VariantResult variantResult = context.ReportRuntime.EvaluateChartItemInLegendToolTipExpression(this, this.m_chart.Name);
            string result = null;

            if (variantResult.ErrorOccurred)
            {
                result = RPRes.rsExpressionErrorValue;
            }
            else if (variantResult.Value != null)
            {
                result = Formatter.Format(variantResult.Value, ref this.m_formatter, this.m_chart.StyleClass, (Style)null, context, AspNetCore.ReportingServices.ReportProcessing.ObjectType.Chart, this.m_chart.Name);
            }
            return(result);
        }
Пример #19
0
        public bool CalculateDuplicates(AspNetCore.ReportingServices.RdlExpressions.VariantResult currentResult, OnDemandProcessingContext context)
        {
            bool flag = false;

            if (this.m_hideDuplicates != null)
            {
                if (this.m_hasOldResult)
                {
                    if (currentResult.ErrorOccurred && this.m_oldResult.ErrorOccurred)
                    {
                        flag = true;
                    }
                    else if (currentResult.ErrorOccurred)
                    {
                        flag = false;
                    }
                    else if (this.m_oldResult.ErrorOccurred)
                    {
                        flag = false;
                    }
                    else if (currentResult.Value == null && this.m_oldResult.Value == null)
                    {
                        flag = true;
                    }
                    else if (currentResult.Value == null)
                    {
                        flag = false;
                    }
                    else
                    {
                        bool flag2 = default(bool);
                        flag = (0 == AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.CompareTo(currentResult.Value, this.m_oldResult.Value, (context.CurrentOdpDataSetInstance != null) ? context.CurrentOdpDataSetInstance.DataSetDef.NullsAsBlanks : context.NullsAsBlanks, (context.CurrentOdpDataSetInstance != null) ? context.CurrentOdpDataSetInstance.CompareInfo : context.CompareInfo, (context.CurrentOdpDataSetInstance != null) ? context.CurrentOdpDataSetInstance.ClrCompareOptions : context.ClrCompareOptions, false, false, out flag2));
                        if (!flag2)
                        {
                            flag = false;
                        }
                    }
                }
                if (!flag)
                {
                    this.m_hasOldResult = true;
                    this.m_oldResult    = currentResult;
                }
            }
            return(flag);
        }
 private void CalculateValue()
 {
     if (this.m_isVisited)
     {
         this.m_iErrorContext.Register(ProcessingErrorCode.rsCyclicExpression, Severity.Warning, ObjectType.Field, this.m_fieldDef.Name, "Value");
         throw new ReportProcessingException_InvalidOperationException();
     }
     this.m_isVisited = true;
     AspNetCore.ReportingServices.RdlExpressions.VariantResult variantResult = this.m_reportRT.EvaluateFieldValueExpression(this.m_fieldDef);
     this.m_value         = variantResult.Value;
     this.m_errorOccurred = variantResult.ErrorOccurred;
     if (this.m_errorOccurred)
     {
         this.m_exceptionMessage = variantResult.ExceptionMessage;
     }
     this.m_isVisited    = false;
     this.m_isValueReady = true;
 }
Пример #21
0
 public AspNetCore.ReportingServices.RdlExpressions.VariantResult GetResult(IReportScopeInstance romInstance)
 {
     if (!this.m_isValueReady)
     {
         if (this.m_isVisited)
         {
             this.m_iErrorContext.Register(ProcessingErrorCode.rsCyclicExpression, Severity.Warning, this.m_textRunDef.ObjectType, this.m_textRunDef.Name, "Value");
             throw new ReportProcessingException_InvalidOperationException();
         }
         this.m_isVisited = true;
         ObjectType objectType   = this.m_reportRT.ObjectType;
         string     objectName   = this.m_reportRT.ObjectName;
         string     propertyName = this.m_reportRT.PropertyName;
         IScope     currentScope = this.m_reportRT.CurrentScope;
         this.m_reportRT.CurrentScope = this.m_scope;
         OnDemandProcessingContext odpContext        = this.m_reportRT.ReportObjectModel.OdpContext;
         ObjectModelImpl           reportObjectModel = this.m_reportRT.ReportObjectModel;
         try
         {
             odpContext.SetupContext(this.m_textBoxDef, romInstance);
             bool flag = (this.m_textRunDef.Action != null && this.m_textRunDef.Action.TrackFieldsUsedInValueExpression) || (this.m_textBoxDef != null && this.m_textBoxDef.Action != null && this.m_textBoxDef.Action.TrackFieldsUsedInValueExpression);
             if (flag)
             {
                 reportObjectModel.ResetFieldsUsedInExpression();
             }
             this.m_result = this.m_reportRT.EvaluateTextRunValueExpression(this.m_textRunDef);
             if (flag)
             {
                 this.m_fieldsUsedInValueExpression = new List <string>();
                 reportObjectModel.AddFieldsUsedInExpression(this.m_fieldsUsedInValueExpression);
             }
         }
         finally
         {
             this.m_reportRT.CurrentScope = currentScope;
             this.m_reportRT.ObjectType   = objectType;
             this.m_reportRT.ObjectName   = objectName;
             this.m_reportRT.PropertyName = propertyName;
             this.m_isVisited             = false;
             this.m_isValueReady          = true;
         }
     }
     return(this.m_result);
 }
Пример #22
0
        public string GetFormattedLabelValue(AspNetCore.ReportingServices.RdlExpressions.VariantResult labelObject, OnDemandProcessingContext context)
        {
            string result = null;

            if (labelObject.ErrorOccurred)
            {
                result = RPRes.rsExpressionErrorValue;
            }
            else if (labelObject.Value != null)
            {
                Type     type     = labelObject.Value.GetType();
                TypeCode typeCode = Type.GetTypeCode(type);
                if (this.m_formatter == null)
                {
                    this.m_formatter = new Formatter(base.DataRegionDef.StyleClass, context, AspNetCore.ReportingServices.ReportProcessing.ObjectType.Chart, base.DataRegionDef.Name);
                }
                result = this.m_formatter.FormatValue(labelObject.Value, typeCode);
            }
            return(result);
        }
Пример #23
0
        public AspNetCore.ReportingServices.RdlExpressions.VariantResult[] EvaluateJoinConditionKeys(bool evaluatePrimaryKeys, AspNetCore.ReportingServices.RdlExpressions.ReportRuntime reportRuntime)
        {
            int joinConditionCount = this.JoinConditionCount;

            if (joinConditionCount == 0)
            {
                return(null);
            }
            AspNetCore.ReportingServices.RdlExpressions.VariantResult[] array = new AspNetCore.ReportingServices.RdlExpressions.VariantResult[joinConditionCount];
            for (int i = 0; i < joinConditionCount; i++)
            {
                if (evaluatePrimaryKeys)
                {
                    array[i] = this.m_joinConditions[i].EvaluatePrimaryKeyExpr(reportRuntime);
                }
                else
                {
                    array[i] = this.m_joinConditions[i].EvaluateForeignKeyExpr(reportRuntime);
                }
            }
            return(array);
        }
Пример #24
0
 public void SetResult(AspNetCore.ReportingServices.RdlExpressions.VariantResult result)
 {
     this.m_result       = result;
     this.m_isValueReady = true;
 }
Пример #25
0
        public object[] EvaluateLookup()
        {
            bool flag = this.m_lookupInfo.ReturnFirstMatchOnly();
            OnDemandProcessingContext odpContext = this.m_reportRuntime.ReportObjectModel.OdpContext;

            AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet = odpContext.ReportDefinition.MappingDataSetIndexToDataSet[this.m_lookupInfo.DataSetIndexInCollection];
            DataSetInstance dataSetInstance = odpContext.GetDataSetInstance(dataSet);

            if (dataSetInstance == null)
            {
                throw new ReportProcessingException_InvalidOperationException();
            }
            if (dataSetInstance.NoRows)
            {
                return(LookupImpl.EmptyResult);
            }
            if (dataSetInstance.LookupResults == null || dataSetInstance.LookupResults[this.m_lookupInfo.DestinationIndexInCollection] == null)
            {
                if (!odpContext.CalculateLookup(this.m_lookupInfo))
                {
                    return(LookupImpl.EmptyResult);
                }
                Global.Tracer.Assert(null != dataSetInstance.LookupResults, "Lookup not initialized correctly by tablix processing");
            }
            LookupObjResult lookupObjResult = dataSetInstance.LookupResults[this.m_lookupInfo.DestinationIndexInCollection];

            if (lookupObjResult.ErrorOccured)
            {
                IErrorContext reportRuntime = this.m_reportRuntime;
                if (lookupObjResult.DataFieldStatus == DataFieldStatus.None && lookupObjResult.ErrorCode != 0)
                {
                    reportRuntime.Register(lookupObjResult.ErrorCode, lookupObjResult.ErrorSeverity, lookupObjResult.ErrorMessageArgs);
                }
                else if (lookupObjResult.DataFieldStatus == DataFieldStatus.UnSupportedDataType)
                {
                    reportRuntime.Register(ProcessingErrorCode.rsLookupOfInvalidExpressionDataType, Severity.Warning, lookupObjResult.ErrorMessageArgs);
                }
                throw new ReportProcessingException_InvalidOperationException();
            }
            AspNetCore.ReportingServices.RdlExpressions.VariantResult result = this.m_lookupInfo.EvaluateSourceExpr(this.m_reportRuntime);
            this.CheckExprResultError(result);
            bool           flag2                         = lookupObjResult.HasBeenTransferred || odpContext.CurrentDataSetIndex != dataSet.IndexInCollection;
            List <object>  list                          = null;
            CompareInfo    compareInfo                   = null;
            CompareOptions clrCompareOptions             = CompareOptions.None;
            bool           nullsAsBlanks                 = false;
            bool           useOrdinalStringKeyGeneration = false;

            try
            {
                if (flag2)
                {
                    compareInfo                   = odpContext.CompareInfo;
                    clrCompareOptions             = odpContext.ClrCompareOptions;
                    nullsAsBlanks                 = odpContext.NullsAsBlanks;
                    useOrdinalStringKeyGeneration = odpContext.UseOrdinalStringKeyGeneration;
                    dataSetInstance.SetupCollationSettings(odpContext);
                }
                LookupTable lookupTable = lookupObjResult.GetLookupTable(odpContext);
                Global.Tracer.Assert(lookupTable != null, "LookupTable must not be null");
                ObjectModelImpl reportObjectModel = odpContext.ReportObjectModel;
                AspNetCore.ReportingServices.ReportIntermediateFormat.Persistence.ChunkManager.DataChunkReader dataChunkReader = null;
                if (flag2)
                {
                    dataChunkReader = odpContext.GetDataChunkReader(dataSet.IndexInCollection);
                }
                using (reportObjectModel.SetupNewFieldsWithBackup(dataSet, dataSetInstance, dataChunkReader))
                {
                    object[] array = result.Value as object[];
                    if (array == null)
                    {
                        array = new object[1]
                        {
                            result.Value
                        };
                    }
                    else
                    {
                        list = new List <object>(array.Length);
                    }
                    object[] array2 = array;
                    foreach (object key in array2)
                    {
                        LookupMatches lookupMatches = default(LookupMatches);
                        if (lookupTable.TryGetValue(key, out lookupMatches))
                        {
                            int num = flag ? 1 : lookupMatches.MatchCount;
                            if (list == null)
                            {
                                list = new List <object>(num);
                            }
                            for (int j = 0; j < num; j++)
                            {
                                lookupMatches.SetupRow(j, odpContext);
                                AspNetCore.ReportingServices.RdlExpressions.VariantResult result2 = this.m_lookupInfo.EvaluateResultExpr(this.m_reportRuntime);
                                this.CheckExprResultError(result2);
                                list.Add(result2.Value);
                            }
                        }
                    }
                }
            }
            finally
            {
                if (compareInfo != null)
                {
                    odpContext.SetComparisonInformation(compareInfo, clrCompareOptions, nullsAsBlanks, useOrdinalStringKeyGeneration);
                }
            }
            object[] result3 = LookupImpl.EmptyResult;
            if (list != null)
            {
                result3 = list.ToArray();
            }
            return(result3);
        }
Пример #26
0
 public string EvaluateToolTip(IReportScopeInstance reportScopeInstance, OnDemandProcessingContext context)
 {
     context.SetupContext(base.m_map, reportScopeInstance);
     AspNetCore.ReportingServices.RdlExpressions.VariantResult variantResult = context.ReportRuntime.EvaluateMapDockableSubItemToolTipExpression(this, base.m_map.Name);
     return(base.m_map.GetFormattedStringFromValue(ref variantResult, context));
 }
Пример #27
0
 public string EvaluateLegendText(IReportScopeInstance reportScopeInstance, OnDemandProcessingContext context)
 {
     context.SetupContext(this.m_map, reportScopeInstance);
     AspNetCore.ReportingServices.RdlExpressions.VariantResult variantResult = context.ReportRuntime.EvaluateMapAppearanceRuleLegendTextExpression(this, this.m_map.Name);
     return(this.m_map.GetFormattedStringFromValue(ref variantResult, context));
 }
Пример #28
0
 public override void EvaluateScopedFieldReference(string scopeName, int fieldIndex, ref AspNetCore.ReportingServices.RdlExpressions.VariantResult result)
 {
     this.FireAssert("EvaluateScopedFieldReference");
 }
Пример #29
0
 public abstract void EvaluateScopedFieldReference(string scopeName, int fieldIndex, ref AspNetCore.ReportingServices.RdlExpressions.VariantResult result);
 public override void EvaluateScopedFieldReference(string scopeName, int fieldIndex, ref AspNetCore.ReportingServices.RdlExpressions.VariantResult result)
 {
     Global.Tracer.Assert(false, "Scoped field references are not supported in Full ODP mode.");
     throw new NotImplementedException();
 }