示例#1
0
 internal override void RestoreContext(IInstancePath originalObject)
 {
     if (originalObject != null && m_odpContext.ReportRuntime.ContextUpdated && m_lastRIFObject != originalObject)
     {
         SetupObjectModels((IRIFReportDataScope)originalObject, -1);
     }
 }
 public override void RestoreContext(IInstancePath originalObject)
 {
     if (originalObject != null && base.m_odpContext.ReportRuntime.ContextUpdated && !InstancePathItem.IsSameScopePath(originalObject, this.m_lastRIFObject))
     {
         this.SetupContext(originalObject, null, -1);
     }
 }
        private void PerformOnDemandTablixProcessingWithContextRestore(AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet)
        {
            Global.Tracer.Assert(!base.m_odpContext.IsTablixProcessingMode, "Nested calls of tablix data processing are not supported");
            IInstancePath lastRIFObject = this.m_lastRIFObject;

            this.PerformOnDemandTablixProcessing(dataSet);
            this.RestoreContext(lastRIFObject);
        }
示例#4
0
        internal override void SetupContext(IInstancePath rifObject, IReportScopeInstance romInstance, int moveNextInstanceIndex)
        {
            m_lastROMInstance = romInstance;
            IRIFReportDataScope iRIFReportDataScope = romInstance.ReportScope.RIFReportScope as IRIFReportDataScope;

            if (iRIFReportDataScope != null && (m_lastOnDemandScopeInstance == null || iRIFReportDataScope.CurrentStreamingScopeInstance != m_lastOnDemandScopeInstance))
            {
                SetupObjectModels(iRIFReportDataScope, moveNextInstanceIndex);
            }
        }
示例#5
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;
 }
 internal ActionInfo(RenderingContext renderingContext, IReportScope reportScope, Microsoft.ReportingServices.ReportIntermediateFormat.Action actionDef, IInstancePath instancePath, ReportElement reportElementOwner, ObjectType objectType, string objectName, IROMActionOwner romActionOwner)
 {
     m_renderingContext   = renderingContext;
     m_reportScope        = reportScope;
     m_actionDef          = actionDef;
     m_isOldSnapshot      = false;
     m_instancePath       = instancePath;
     m_reportElementOwner = reportElementOwner;
     m_objectType         = objectType;
     m_objectName         = objectName;
     m_romActionOwner     = romActionOwner;
 }
示例#7
0
 public ActionInfo(RenderingContext renderingContext, IReportScope reportScope, AspNetCore.ReportingServices.ReportIntermediateFormat.Action actionDef, IInstancePath instancePath, ReportElement reportElementOwner, ObjectType objectType, string objectName, IROMActionOwner romActionOwner)
 {
     this.m_renderingContext   = renderingContext;
     this.m_reportScope        = reportScope;
     this.m_actionDef          = actionDef;
     this.m_isOldSnapshot      = false;
     this.m_instancePath       = instancePath;
     this.m_reportElementOwner = reportElementOwner;
     this.m_objectType         = objectType;
     this.m_objectName         = objectName;
     this.m_romActionOwner     = romActionOwner;
 }
        public override void SetupContext(IInstancePath rifObject, IReportScopeInstance romInstance, int moveNextInstanceIndex)
        {
            this.m_lastROMInstance = romInstance;
            IRIFReportDataScope iRIFReportDataScope = romInstance.ReportScope.RIFReportScope as IRIFReportDataScope;

            if (iRIFReportDataScope != null)
            {
                if (this.m_lastOnDemandScopeInstance != null && iRIFReportDataScope.CurrentStreamingScopeInstance == this.m_lastOnDemandScopeInstance)
                {
                    return;
                }
                this.SetupObjectModels(iRIFReportDataScope, moveNextInstanceIndex);
            }
        }
        public override void SetupContext(IInstancePath rifObject, IReportScopeInstance romInstance, int moveNextInstanceIndex)
        {
            bool flag             = false;
            bool needDeepCopyPath = false;

            if (romInstance == null)
            {
                flag = true;
                this.m_lastRIFObject = rifObject;
                needDeepCopyPath     = true;
            }
            else if (romInstance.IsNewContext || this.m_lastROMInstance == null || this.m_lastRIFObject == null || 0 <= moveNextInstanceIndex)
            {
                flag = true;
                romInstance.IsNewContext = false;
                this.m_lastROMInstance   = romInstance;
                this.m_lastRIFObject     = rifObject;
                needDeepCopyPath         = true;
            }
            else if (this.m_lastROMInstance.Equals(romInstance))
            {
                if (!this.m_lastRIFObject.Equals(rifObject) && (this.m_lastRIFObject.InstancePathItem.Type == InstancePathItemType.SubReport || rifObject.InstancePathItem.Type == InstancePathItemType.SubReport))
                {
                    flag = true;
                }
                this.m_lastRIFObject = rifObject;
            }
            else if (this.m_lastRIFObject.Equals(rifObject))
            {
                this.m_lastROMInstance = romInstance;
            }
            else if (InstancePathItem.IsSamePath(this.m_lastInstancePath, rifObject.InstancePath))
            {
                this.m_lastROMInstance = romInstance;
                this.m_lastRIFObject   = rifObject;
            }
            else
            {
                flag = true;
                this.m_lastROMInstance = romInstance;
                this.m_lastRIFObject   = rifObject;
                needDeepCopyPath       = true;
            }
            if (flag)
            {
                this.SetupObjectModels(OnDemandMode.FullSetup, needDeepCopyPath, moveNextInstanceIndex, null);
                base.m_odpContext.ReportRuntime.ContextUpdated = true;
            }
        }
示例#10
0
        protected static IRIFReportDataScope FindReportDataScope(IInstancePath candidate)
        {
            IRIFReportDataScope iRIFReportDataScope = null;

            while (candidate != null && iRIFReportDataScope == null)
            {
                InstancePathItemType type = candidate.InstancePathItem.Type;
                if (type == InstancePathItemType.DataRegion || (uint)(type - 3) <= 3u)
                {
                    iRIFReportDataScope = (IRIFReportDataScope)candidate;
                }
                candidate = candidate.ParentInstancePath;
            }
            return(iRIFReportDataScope);
        }
        public static bool IsSameScopePath(IInstancePath originalRIFObject, IInstancePath lastRIFObject)
        {
            if (null == originalRIFObject != (null == lastRIFObject))
            {
                return(false);
            }
            if (originalRIFObject == null && lastRIFObject == null)
            {
                return(true);
            }
            if (originalRIFObject.Equals(lastRIFObject))
            {
                return(true);
            }
            List <InstancePathItem> instancePath  = originalRIFObject.InstancePath;
            List <InstancePathItem> instancePath2 = lastRIFObject.InstancePath;
            bool flag            = default(bool);
            int  sharedPathIndex = InstancePathItem.GetSharedPathIndex(0, instancePath, instancePath2, false, out flag);

            if (flag)
            {
                return(true);
            }
            if (sharedPathIndex < 0)
            {
                return(false);
            }
            int count  = instancePath.Count;
            int count2 = instancePath2.Count;
            int i      = sharedPathIndex + 1;
            int j      = sharedPathIndex + 1;

            for (; i < count && !instancePath[i].IsScope; i++)
            {
            }
            if (i + 1 == count && instancePath[i].m_indexType == InstancePathItemType.SubReport)
            {
                i = count;
            }
            for (; j < count2 && !instancePath2[j].IsScope; j++)
            {
            }
            if (i == count && j == count2)
            {
                return(true);
            }
            return(false);
        }
        internal static bool IsSameScopePath(IInstancePath originalRIFObject, IInstancePath lastRIFObject)
        {
            if (originalRIFObject == null != (lastRIFObject == null))
            {
                return(false);
            }
            if (originalRIFObject == null && lastRIFObject == null)
            {
                return(true);
            }
            if (originalRIFObject.Equals(lastRIFObject))
            {
                return(true);
            }
            List <InstancePathItem> instancePath  = originalRIFObject.InstancePath;
            List <InstancePathItem> instancePath2 = lastRIFObject.InstancePath;
            bool identicalPaths;
            int  sharedPathIndex = GetSharedPathIndex(0, instancePath, instancePath2, returnPreviousIndex: false, out identicalPaths);

            if (identicalPaths)
            {
                return(true);
            }
            if (sharedPathIndex < 0)
            {
                return(false);
            }
            int count  = instancePath.Count;
            int count2 = instancePath2.Count;
            int i      = sharedPathIndex + 1;
            int j      = sharedPathIndex + 1;

            for (; i < count && !instancePath[i].IsScope; i++)
            {
            }
            if (i + 1 == count && instancePath[i].m_indexType == InstancePathItemType.SubReport)
            {
                i = count;
            }
            for (; j < count2 && !instancePath2[j].IsScope; j++)
            {
            }
            if (i == count && j == count2)
            {
                return(true);
            }
            return(false);
        }
示例#13
0
        protected static IRIFReportDataScope FindReportDataScope(IInstancePath candidate)
        {
            IRIFReportDataScope iRIFReportDataScope = null;

            while (candidate != null && iRIFReportDataScope == null)
            {
                switch (candidate.InstancePathItem.Type)
                {
                case InstancePathItemType.DataRegion:
                case InstancePathItemType.Cell:
                case InstancePathItemType.ColumnMemberInstanceIndexTopMost:
                case InstancePathItemType.ColumnMemberInstanceIndex:
                case InstancePathItemType.RowMemberInstanceIndex:
                    iRIFReportDataScope = (IRIFReportDataScope)candidate;
                    break;
                }
                candidate = candidate.ParentInstancePath;
            }
            return(iRIFReportDataScope);
        }
        public override void BindNextMemberInstance(IInstancePath rifObject, IReportScopeInstance romInstance, int moveNextInstanceIndex)
        {
            IRIFReportDataScope iRIFReportDataScope        = romInstance.ReportScope.RIFReportScope as IRIFReportDataScope;
            IReference <IOnDemandMemberInstance> reference = iRIFReportDataScope.CurrentStreamingScopeInstance as IReference <IOnDemandMemberInstance>;

            if (!reference.Value().IsNoRows)
            {
                IDisposable             disposable             = reference.PinValue();
                IOnDemandMemberInstance onDemandMemberInstance = reference.Value();
                iRIFReportDataScope.BindToStreamingScopeInstance(onDemandMemberInstance.GetNextMemberInstance());
                if (!iRIFReportDataScope.IsBoundToStreamingScopeInstance && OnDemandStateManagerStreaming.CanBindOrProcessIndividually(iRIFReportDataScope) && onDemandMemberInstance.IsMostRecentlyCreatedScopeInstance)
                {
                    IdcDataManager idcDataManager = null;
                    if (iRIFReportDataScope.DataScopeInfo.NeedsIDC)
                    {
                        idcDataManager = (IdcDataManager)base.GetIdcDataManager(iRIFReportDataScope);
                        List <object> groupExprValues = onDemandMemberInstance.GroupExprValues;
                        AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode   reportHierarchyNode = (AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode)iRIFReportDataScope;
                        List <AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo> groupExpressions    = reportHierarchyNode.Grouping.GroupExpressions;
                        idcDataManager.SetSkippingFilter(groupExpressions, groupExprValues);
                    }
                    if (this.TryProcessToNextScopeInstance(iRIFReportDataScope))
                    {
                        iRIFReportDataScope.BindToStreamingScopeInstance(onDemandMemberInstance.GetNextMemberInstance());
                    }
                    if (idcDataManager != null)
                    {
                        idcDataManager.ClearSkippingFilter();
                    }
                }
                if (!iRIFReportDataScope.IsBoundToStreamingScopeInstance)
                {
                    iRIFReportDataScope.BindToNoRowsScopeInstance(base.m_odpContext);
                }
                this.SetupEnvironment(iRIFReportDataScope, iRIFReportDataScope.CurrentStreamingScopeInstance.Value(), iRIFReportDataScope.CurrentStreamingScopeInstance);
                disposable.Dispose();
            }
        }
示例#15
0
 public object EvaluateDrillthroughParamValue(IReportScopeInstance romInstance, OnDemandProcessingContext context, IInstancePath ownerItem, List <string> fieldsUsedInOwnerValue, ParameterValue paramValue, AspNetCore.ReportingServices.ReportProcessing.ObjectType objectType, string objectName)
 {
     context.SetupContext(ownerItem, romInstance);
     AspNetCore.ReportingServices.RdlExpressions.ReportRuntime reportRuntime = context.ReportRuntime;
     reportRuntime.FieldsUsedInCurrentActionOwnerValue = fieldsUsedInOwnerValue;
     AspNetCore.ReportingServices.RdlExpressions.ParameterValueResult parameterValueResult = reportRuntime.EvaluateParameterValueExpression(paramValue, objectType, objectName, "DrillthroughParameterValue");
     reportRuntime.FieldsUsedInCurrentActionOwnerValue = null;
     return(parameterValueResult.Value);
 }
示例#16
0
 public string EvaluateLabel(IReportScopeInstance romInstance, OnDemandProcessingContext context, IInstancePath ownerItem, AspNetCore.ReportingServices.ReportProcessing.ObjectType objectType, string objectName)
 {
     context.SetupContext(ownerItem, romInstance);
     return(context.ReportRuntime.EvaluateActionLabelExpression(this, this.m_label, objectType, objectName));
 }
示例#17
0
 public string EvaluateDrillthroughReportName(IReportScopeInstance romInstance, OnDemandProcessingContext context, IInstancePath ownerItem, AspNetCore.ReportingServices.ReportProcessing.ObjectType objectType, string objectName)
 {
     context.SetupContext(ownerItem, romInstance);
     return(context.ReportRuntime.EvaluateReportItemDrillthroughReportName(this, this.m_drillthroughReportName, objectType, objectName));
 }
示例#18
0
 public string EvaluateHyperLinkURL(IReportScopeInstance romInstance, OnDemandProcessingContext context, IInstancePath ownerItem, AspNetCore.ReportingServices.ReportProcessing.ObjectType objectType, string objectName)
 {
     context.SetupContext(ownerItem, romInstance);
     return(context.ReportRuntime.EvaluateReportItemHyperlinkURLExpression(this, this.m_hyperLinkURL, objectType, objectName));
 }
 public override void BindNextMemberInstance(IInstancePath rifObject, IReportScopeInstance romInstance, int moveNextInstanceIndex)
 {
     Global.Tracer.Assert(false, "This method is not valid for this StateManager type.");
     throw new InvalidOperationException("This method is not valid for this StateManager type.");
 }
示例#20
0
 internal override void SetupContext(IInstancePath rifObject, IReportScopeInstance romInstance)
 {
     SetupContext(rifObject, romInstance, -1);
 }
示例#21
0
 internal override void BindNextMemberInstance(IInstancePath rifObject, IReportScopeInstance romInstance, int moveNextInstanceIndex)
 {
     FireAssert("BindNextMemberInstance");
     throw new InvalidOperationException("This method is not valid for this StateManager type.");
 }
示例#22
0
 internal Microsoft.ReportingServices.RdlExpressions.VariantResult GetResult(IReportScopeInstance romInstance, bool calledFromValue)
 {
     if (calledFromValue && !IsTextboxInScope())
     {
         m_result = default(Microsoft.ReportingServices.RdlExpressions.VariantResult);
     }
     else if (!m_isValueReady)
     {
         if (m_isVisited)
         {
             m_iErrorContext.Register(ProcessingErrorCode.rsCyclicExpression, Severity.Warning, m_textBox.ObjectType, m_textBox.Name, "Value");
             throw new ReportProcessingException_InvalidOperationException();
         }
         m_isVisited = true;
         _           = m_reportRT.ReportObjectModel;
         OnDemandProcessingContext odpContext = m_reportRT.ReportObjectModel.OdpContext;
         bool          contextUpdated         = m_reportRT.ContextUpdated;
         IInstancePath originalObject         = null;
         m_reportRT.ContextUpdated = false;
         if (odpContext.IsTablixProcessingMode || calledFromValue)
         {
             originalObject = odpContext.LastRIFObject;
         }
         bool flag = m_textBox.Action != null && m_textBox.Action.TrackFieldsUsedInValueExpression;
         Dictionary <string, bool> dictionary = null;
         if (flag)
         {
             dictionary = new Dictionary <string, bool>();
         }
         try
         {
             bool flag2 = false;
             if (m_paragraphs.Count == 1)
             {
                 TextRunsImpl textRunsImpl = (TextRunsImpl)m_paragraphs[0].TextRuns;
                 if (textRunsImpl.Count == 1)
                 {
                     flag2 = true;
                     TextRunImpl textRunImpl = (TextRunImpl)textRunsImpl[0];
                     m_result = textRunImpl.GetResult(romInstance);
                     if (flag)
                     {
                         textRunImpl.MergeFieldsUsedInValueExpression(dictionary);
                     }
                 }
             }
             if (!flag2)
             {
                 bool flag3 = false;
                 m_result = default(Microsoft.ReportingServices.RdlExpressions.VariantResult);
                 StringBuilder stringBuilder = new StringBuilder();
                 for (int i = 0; i < m_paragraphs.Count; i++)
                 {
                     if (i > 0)
                     {
                         flag3 = true;
                         stringBuilder.Append(Environment.NewLine);
                     }
                     TextRunsImpl textRunsImpl2 = (TextRunsImpl)m_paragraphs[i].TextRuns;
                     for (int j = 0; j < textRunsImpl2.Count; j++)
                     {
                         TextRunImpl textRunImpl2 = (TextRunImpl)textRunsImpl2[j];
                         Microsoft.ReportingServices.RdlExpressions.VariantResult result = textRunImpl2.GetResult(romInstance);
                         if (result.Value != null)
                         {
                             if (result.TypeCode == TypeCode.Object && (result.Value is TimeSpan || result.Value is DateTimeOffset))
                             {
                                 string text = textRunImpl2.TextRunDef.FormatTextRunValue(result, odpContext);
                                 if (text != null)
                                 {
                                     result.Value = text;
                                 }
                                 else
                                 {
                                     result.Value = Microsoft.ReportingServices.RdlExpressions.ReportRuntime.ConvertToStringFallBack(result.Value);
                                 }
                             }
                             flag3 = true;
                             stringBuilder.Append(result.Value);
                         }
                         if (flag)
                         {
                             textRunImpl2.MergeFieldsUsedInValueExpression(dictionary);
                         }
                     }
                 }
                 if (flag3)
                 {
                     m_result.Value    = stringBuilder.ToString();
                     m_result.TypeCode = TypeCode.String;
                 }
             }
             if (flag)
             {
                 m_fieldsUsedInValueExpression = new List <string>();
                 foreach (string key in dictionary.Keys)
                 {
                     m_fieldsUsedInValueExpression.Add(key);
                 }
             }
         }
         finally
         {
             odpContext.RestoreContext(originalObject);
             m_reportRT.ContextUpdated = contextUpdated;
             m_isVisited    = false;
             m_isValueReady = true;
         }
     }
     return(m_result);
 }
 internal ActionInfoWithDynamicImageMap(RenderingContext renderingContext, ReportItem owner, IReportScope reportScope, IInstancePath instancePath, IROMActionOwner romActionOwner, bool chartConstructor)
     : this(renderingContext, reportScope, new Microsoft.ReportingServices.ReportIntermediateFormat.Action(), instancePath, owner, romActionOwner)
 {
     m_chartConstruction = chartConstructor;
 }
示例#24
0
 public override void RestoreContext(IInstancePath originalObject)
 {
     this.FireAssert("RestoreContext");
 }
 internal ActionInfoWithDynamicImageMap(RenderingContext renderingContext, IReportScope reportScope, Microsoft.ReportingServices.ReportIntermediateFormat.Action actionDef, IInstancePath instancePath, ReportItem owner, IROMActionOwner romActionOwner)
     : base(renderingContext, reportScope, actionDef, instancePath, owner, owner.ReportItemDef.ObjectType, owner.ReportItemDef.Name, romActionOwner)
 {
     base.IsDynamic = true;
 }
示例#26
0
 public bool EvaluateDrillthroughParamOmit(IReportScopeInstance romInstance, OnDemandProcessingContext context, IInstancePath ownerItem, ParameterValue paramValue, AspNetCore.ReportingServices.ReportProcessing.ObjectType objectType, string objectName)
 {
     context.SetupContext(ownerItem, romInstance);
     return(context.ReportRuntime.EvaluateParamValueOmitExpression(paramValue, objectType, objectName));
 }
示例#27
0
 internal override void RestoreContext(IInstancePath originalObject)
 {
     FireAssert("RestoreContext");
 }
示例#28
0
 internal override void SetupContext(IInstancePath rifObject, IReportScopeInstance romInstance, int moveNextInstanceIndex)
 {
     FireAssert("SetupContext");
 }
示例#29
0
 public override void SetupContext(IInstancePath rifObject, IReportScopeInstance romInstance)
 {
     this.FireAssert("SetupContext");
 }
 public override void SetupContext(IInstancePath rifObject, IReportScopeInstance romInstance)
 {
     this.SetupContext(rifObject, romInstance, -1);
 }