Пример #1
0
        public bool FetchSubReportData(AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport subReport, AspNetCore.ReportingServices.ReportIntermediateFormat.SubReportInstance subReportInstance)
        {
            AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance = subReportInstance.ReportInstance.Value();
            reportInstance.ResetReportVariables(subReport.OdpContext);
            bool flag;

            try
            {
                this.FetchData(reportInstance, subReport.MergeTransactions);
                if (subReport.OdpContext.ReprocessSnapshot && reportInstance.IsMissingExpectedDataChunk(subReport.OdpContext))
                {
                    flag = false;
                }
                else
                {
                    if (subReport.OdpContext.ReprocessSnapshot && !subReport.InDataRegion)
                    {
                        Merge.PreProcessTablixes(subReport.Report, subReport.OdpContext, false);
                    }
                    flag = true;
                }
            }
            catch (ProcessingAbortedException)
            {
                flag = false;
            }
            if (flag)
            {
                reportInstance.CalculateAndStoreReportVariables(subReport.OdpContext);
            }
            return(flag);
        }
Пример #2
0
 public static void TraceReportInstance(OnDemandMetadata odpMetadata, ReportInstance reportInstance, Report reportDefinition, int level)
 {
     if (Global.Tracer.TraceVerbose && reportInstance != null)
     {
         if (odpMetadata != null)
         {
             GroupTreeTracer.TraceMetadata(odpMetadata, level);
         }
         Global.Tracer.Trace("{0}Report: NoRows={1}, Language={2}, Variables={3}", GroupTreeTracer.GetEmptyString(level), reportInstance.NoRows, reportInstance.Language, GroupTreeTracer.FlattenObjectArray(reportInstance.VariableValues));
         if (odpMetadata == null && reportDefinition != null && reportDefinition.MappingDataSetIndexToDataSet.Count > 0)
         {
             Global.Tracer.Trace("{0}{1} DataSetInstances: ", GroupTreeTracer.GetEmptyString(level), reportDefinition.MappingDataSetIndexToDataSet.Count);
             IEnumerator cachedDataSetInstances = reportInstance.GetCachedDataSetInstances();
             while (cachedDataSetInstances.MoveNext())
             {
                 DataSetInstance dataSetInstance = (DataSetInstance)cachedDataSetInstances.Current;
                 if (dataSetInstance != null)
                 {
                     GroupTreeTracer.TraceDataSetInstance(dataSetInstance, level + 1);
                 }
             }
         }
         GroupTreeTracer.TraceScopeInstance(reportInstance, level);
     }
 }
Пример #3
0
 public void SetupReport(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance)
 {
     this.m_odpContext.CurrentReportInstance = reportInstance;
     if (!this.m_odpContext.InitializedRuntime)
     {
         this.m_odpContext.InitializedRuntime = true;
         List <ReportSection> reportSections = this.m_report.ReportSections;
         if (reportSections != null)
         {
             foreach (ReportSection item in reportSections)
             {
                 this.m_odpContext.RuntimeInitializeReportItemObjs(item.ReportItems, true);
                 this.m_odpContext.RuntimeInitializeTextboxObjs(item.ReportItems, true);
             }
         }
         if (this.m_report.HasVariables)
         {
             this.m_odpContext.RuntimeInitializeVariables(this.m_report);
         }
         if (this.m_report.HasLookups)
         {
             this.m_odpContext.RuntimeInitializeLookups(this.m_report);
         }
         this.m_report.RegisterDataSetScopedAggregates(this.m_odpContext);
     }
 }
        public bool StoreUpdatedVariableValue(OnDemandProcessingContext odpContext, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance, int index, object value)
        {
            this.m_metaDataChanged = true;
            if (this.m_updatedVariableValues == null)
            {
                this.m_updatedVariableValues = new Dictionary <string, UpdatedVariableValues>();
            }
            string key = odpContext.SubReportUniqueName ?? "Report";
            UpdatedVariableValues    updatedVariableValues = default(UpdatedVariableValues);
            Dictionary <int, object> dictionary;

            if (this.m_updatedVariableValues.TryGetValue(key, out updatedVariableValues))
            {
                dictionary = updatedVariableValues.VariableValues;
            }
            else
            {
                dictionary            = new Dictionary <int, object>();
                updatedVariableValues = new UpdatedVariableValues();
                updatedVariableValues.VariableValues = dictionary;
                this.m_updatedVariableValues.Add(key, updatedVariableValues);
            }
            if (reportInstance != null && reportInstance.VariableValues != null)
            {
                reportInstance.VariableValues[index] = value;
            }
            dictionary[index] = value;
            return(true);
        }
Пример #5
0
        public void EvaluateReportLanguage(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance, string snapshotLanguage)
        {
            CultureInfo cultureInfo = null;

            if (snapshotLanguage != null)
            {
                this.m_reportLanguage = snapshotLanguage;
                cultureInfo           = Merge.GetSpecificCultureInfoFromLanguage(snapshotLanguage, this.m_odpContext.ErrorContext);
            }
            else if (this.m_report.Language != null)
            {
                if (this.m_report.Language.Type != AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Constant)
                {
                    this.m_odpContext.LanguageInstanceId += 1u;
                    this.m_reportLanguage = this.m_odpContext.ReportRuntime.EvaluateReportLanguageExpression(this.m_report, out cultureInfo);
                }
                else
                {
                    cultureInfo = Merge.GetSpecificCultureInfoFromLanguage(this.m_report.Language.StringValue, this.m_odpContext.ErrorContext);
                }
            }
            if (cultureInfo == null && !this.m_odpContext.InSubreport)
            {
                cultureInfo = Localization.DefaultReportServerSpecificCulture;
            }
            if (cultureInfo != null)
            {
                Thread.CurrentThread.CurrentCulture = cultureInfo;
                reportInstance.Language             = cultureInfo.ToString();
                this.m_odpContext.ThreadCulture     = cultureInfo;
            }
        }
Пример #6
0
        public static IReference <ReportInstance> CreateInstance(IReportInstanceContainer reportInstanceContainer, OnDemandProcessingContext odpContext, Report reportDef, ParameterInfoCollection parameters)
        {
            ReportInstance reportInstance         = new ReportInstance(odpContext, reportDef, parameters);
            IReference <ReportInstance> reference = reportInstanceContainer.SetReportInstance(reportInstance, odpContext.OdpMetadata);

            reportInstance.m_cleanupRef = (IDisposable)reference;
            return(reference);
        }
		private void InitializeEnvironment()
		{
			this.m_processingContext = base.m_romReport.HeaderFooterRenderingContext.OdpContext;
			AspNetCore.ReportingServices.ReportIntermediateFormat.Report reportDef = base.m_romReport.ReportDef;
			AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.ObjectModelImpl reportObjectModel = this.m_processingContext.ReportObjectModel;
			if (reportDef.DataSetsNotOnlyUsedInParameters == 1)
			{
				this.m_processingContext.SetupFieldsForNewDataSetPageSection(reportDef.FirstDataSet);
			}
			else
			{
				this.m_processingContext.SetupEmptyTopLevelFields();
			}
			reportObjectModel.VariablesImpl = new VariablesImpl(false);
			if (reportDef.HasVariables)
			{
				AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance currentReportInstance = base.m_romReport.RenderingContext.OdpContext.CurrentReportInstance;
				this.m_processingContext.RuntimeInitializePageSectionVariables(reportDef, (currentReportInstance != null) ? currentReportInstance.VariableValues : null);
			}
			reportObjectModel.LookupsImpl = new LookupsImpl();
			if (reportDef.HasLookups)
			{
				this.m_processingContext.RuntimeInitializeLookups(reportDef);
			}
			AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.ReportItemsImpl reportItemsImpl = new AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.ReportItemsImpl(false);
			foreach (ReportSection reportSection in base.m_romReport.ReportSections)
			{
				AspNetCore.ReportingServices.ReportIntermediateFormat.ReportSection sectionDef = reportSection.SectionDef;
				reportSection.BodyItemsForHeadFoot = new AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.ReportItemsImpl(false);
				reportSection.PageSectionItemsForHeadFoot = new AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.ReportItemsImpl(false);
				reportObjectModel.ReportItemsImpl = reportSection.BodyItemsForHeadFoot;
				this.m_processingContext.RuntimeInitializeTextboxObjs(sectionDef.ReportItems, false);
				reportObjectModel.ReportItemsImpl = reportSection.PageSectionItemsForHeadFoot;
				AspNetCore.ReportingServices.ReportIntermediateFormat.Page page = sectionDef.Page;
				if (page.PageHeader != null)
				{
					if (this.m_processingContext.ReportRuntime.ReportExprHost != null)
					{
						page.PageHeader.SetExprHost(this.m_processingContext.ReportRuntime.ReportExprHost, reportObjectModel);
					}
					this.m_processingContext.RuntimeInitializeReportItemObjs(page.PageHeader.ReportItems, false);
					this.m_processingContext.RuntimeInitializeTextboxObjs(page.PageHeader.ReportItems, true);
				}
				if (page.PageFooter != null)
				{
					if (this.m_processingContext.ReportRuntime.ReportExprHost != null)
					{
						page.PageFooter.SetExprHost(this.m_processingContext.ReportRuntime.ReportExprHost, reportObjectModel);
					}
					this.m_processingContext.RuntimeInitializeReportItemObjs(page.PageFooter.ReportItems, false);
					this.m_processingContext.RuntimeInitializeTextboxObjs(page.PageFooter.ReportItems, true);
				}
				reportItemsImpl.AddAll(reportSection.BodyItemsForHeadFoot);
				reportItemsImpl.AddAll(reportSection.PageSectionItemsForHeadFoot);
			}
			reportObjectModel.ReportItemsImpl = reportItemsImpl;
			reportObjectModel.AggregatesImpl = new AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.AggregatesImpl(this.m_processingContext);
		}
Пример #8
0
 public Report(AspNetCore.ReportingServices.ReportIntermediateFormat.Report reportDef, RenderingContext renderingContext, string reportName, string description)
 {
     this.m_parentDefinitionPath = null;
     this.m_isOldSnapshot        = false;
     this.m_reportDef            = reportDef;
     this.m_reportInstance       = null;
     this.m_renderingContext     = renderingContext;
     this.m_name        = reportName;
     this.m_description = description;
 }
 public override IRecordRowReader CreateSequentialDataReader(AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet, out AspNetCore.ReportingServices.ReportIntermediateFormat.DataSetInstance dataSetInstance)
 {
     AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance currentReportInstance = base.m_odpContext.CurrentReportInstance;
     dataSetInstance = currentReportInstance.GetDataSetInstance(dataSet, base.m_odpContext);
     AspNetCore.ReportingServices.ReportIntermediateFormat.Persistence.ChunkManager.DataChunkReader dataChunkReader = null;
     if (!dataSetInstance.NoRows)
     {
         dataChunkReader = new AspNetCore.ReportingServices.ReportIntermediateFormat.Persistence.ChunkManager.DataChunkReader(dataSetInstance, base.m_odpContext, dataSetInstance.DataChunkName);
         base.RegisterDisposableDataReaderOrIdcDataManager(dataChunkReader);
     }
     return(dataChunkReader);
 }
Пример #10
0
 protected virtual AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance CreateReportInstance(OnDemandProcessingContext odpContext, OnDemandMetadata odpMetadata, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportSnapshot reportSnapshot, out Merge odpMerge)
 {
     odpMerge = new Merge(this.ReportDefinition, odpContext);
     AspNetCore.ReportingServices.ReportIntermediateFormat.Persistence.ChunkManager.OnDemandProcessingManager.EnsureGroupTreeStorageSetup(odpMetadata, odpContext.ChunkFactory, odpMetadata.GlobalIDOwnerCollection, false, odpContext.GetActiveCompatibilityVersion(), odpContext.ProhibitSerializableValues);
     AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance2 = odpContext.CurrentReportInstance = odpMerge.PrepareReportInstance(odpMetadata);
     AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance4 = reportSnapshot.ReportInstance = reportInstance2;
     AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance5 = reportInstance4;
     odpMerge.Init(this.PublicProcessingContext.Parameters);
     this.SetupReportLanguage(odpMerge, reportInstance5);
     odpMerge.SetupReport(reportInstance5);
     return(reportInstance5);
 }
        protected override RuntimeOnDemandDataSet CreateRuntimeDataSet()
        {
            OnDemandProcessingContext odpContext = base.OdpContext;

            AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance currentReportInstance = odpContext.CurrentReportInstance;
            DataSetInstance dataSetInstance = currentReportInstance.GetDataSetInstance(base.m_dataSet, odpContext);

            if (odpContext.IsTablixProcessingComplete(base.m_dataSet.IndexInCollection))
            {
                Global.Tracer.Trace(TraceLevel.Warning, "Tablix processing is being attempted multiple times on DataSet '{0}'.", base.m_dataSet.Name.MarkAsPrivate());
            }
            return(new RuntimeOnDemandDataSet(base.DataSourceDefinition, base.m_dataSet, dataSetInstance, odpContext, false, true, true));
        }
Пример #12
0
 public Report(IDefinitionPath parentDefinitionPath, AspNetCore.ReportingServices.ReportIntermediateFormat.Report reportDef, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance, RenderingContext renderingContext, string reportName, string description, bool subreportInSubtotal)
 {
     this.m_parentDefinitionPath = parentDefinitionPath;
     this.m_isOldSnapshot        = false;
     this.m_reportDef            = reportDef;
     this.m_reportInstance       = reportInstance;
     this.m_isOldSnapshot        = false;
     this.m_subreportInSubtotal  = subreportInSubtotal;
     this.m_renderingContext     = renderingContext;
     this.m_name           = reportName;
     this.m_description    = description;
     this.m_pageEvaluation = null;
 }
        private void InitDataSet(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance, AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet, ref int dataSetCount)
        {
            DataSetInstance dataSetInstance = null;

            if (reportInstance != null)
            {
                dataSetInstance = reportInstance.GetDataSetInstance(dataSet, this.m_odpContext);
            }
            this.m_dataSets.AddOrUpdate(dataSet, dataSetInstance, this.m_odpContext.ExecutionTime);
            if (!dataSet.UsedOnlyInParameters)
            {
                dataSetCount++;
            }
        }
Пример #14
0
        public override void InstanceComplete()
        {
            if (this.m_reportInstance != null)
            {
                ReportInstance reportInstance = this.m_reportInstance.Value();
                if (reportInstance != null)
                {
                    reportInstance.InstanceComplete();
                }
            }
            IReference <SubReportInstance> reference = (IReference <SubReportInstance>)base.m_cleanupRef;

            base.InstanceComplete();
            reference.PinValue();
        }
Пример #15
0
 public Report(AspNetCore.ReportingServices.ReportIntermediateFormat.Report reportDef, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance, RenderingContext renderingContext, string reportName, string description)
 {
     this.m_parentDefinitionPath = null;
     this.m_isOldSnapshot        = false;
     this.m_reportDef            = reportDef;
     this.m_reportInstance       = reportInstance;
     this.m_renderingContext     = renderingContext;
     this.m_name        = reportName;
     this.m_description = description;
     if (reportDef.HasHeadersOrFooters)
     {
         this.m_pageEvaluation = new OnDemandPageEvaluation(this);
         this.m_renderingContext.SetPageEvaluation(this.m_pageEvaluation);
     }
 }
Пример #16
0
        public bool InitAndSetupSubReport(AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport subReport)
        {
            IReference <AspNetCore.ReportingServices.ReportIntermediateFormat.SubReportInstance> currentSubReportInstance = subReport.CurrentSubReportInstance;
            bool flag = this.InitSubReport(subReport, currentSubReportInstance);

            if (flag)
            {
                AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance = currentSubReportInstance.Value().ReportInstance.Value();
                this.m_odpContext.SetupEnvironment(reportInstance);
                this.m_odpContext.ReportObjectModel.UserImpl.UpdateUserProfileLocationWithoutLocking(UserProfileState.OnDemandExpressions);
                this.m_odpContext.IsUnrestrictedRenderFormatReferenceMode = true;
            }
            currentSubReportInstance.Value().Initialized = true;
            return(flag);
        }
 public void SetUpdatedVariableValues(OnDemandProcessingContext odpContext, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance)
 {
     if (this.m_updatedVariableValues != null)
     {
         string key = odpContext.SubReportUniqueName ?? "Report";
         UpdatedVariableValues updatedVariableValues = default(UpdatedVariableValues);
         if (this.m_updatedVariableValues.TryGetValue(key, out updatedVariableValues))
         {
             Dictionary <int, object> variableValues = updatedVariableValues.VariableValues;
             List <AspNetCore.ReportingServices.ReportIntermediateFormat.Variable> variables = odpContext.ReportDefinition.Variables;
             foreach (KeyValuePair <int, object> item in variableValues)
             {
                 reportInstance.VariableValues[item.Key] = item.Value;
                 AspNetCore.ReportingServices.ReportIntermediateFormat.Variable variable = variables[item.Key];
                 VariableImpl cachedVariableObj = variable.GetCachedVariableObj(odpContext);
                 cachedVariableObj.SetValue(item.Value, true);
             }
         }
     }
 }
        public static IReference <DataRegionInstance> CreateInstance(ScopeInstance parentInstance, OnDemandMetadata odpMetadata, DataRegion dataRegionDef, int dataSetIndex)
        {
            DataRegionInstance              dataRegionInstance        = new DataRegionInstance(dataRegionDef, dataSetIndex);
            GroupTreeScalabilityCache       groupTreeScalabilityCache = odpMetadata.GroupTreeScalabilityCache;
            IReference <DataRegionInstance> reference;

            if (parentInstance.ObjectType == AspNetCore.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType.ReportInstance)
            {
                ReportInstance reportInstance = (ReportInstance)parentInstance;
                reference = reportInstance.GetTopLevelDataRegionReference(dataRegionDef.IndexInCollection);
                groupTreeScalabilityCache.SetTreePartitionContentsAndPin(reference, dataRegionInstance);
            }
            else
            {
                reference = groupTreeScalabilityCache.AllocateAndPin(dataRegionInstance, 0);
                parentInstance.AddChildScope((IReference <ScopeInstance>)reference, dataRegionDef.IndexInCollection);
            }
            dataRegionInstance.m_cleanupRef = (IDisposable)reference;
            return(reference);
        }
Пример #19
0
 public void FetchData(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance, bool mergeTransaction)
 {
     if (this.m_odpContext.ProcessWithCachedData)
     {
         if (!reportInstance.IsMissingExpectedDataChunk(this.m_odpContext))
         {
             return;
         }
         throw new AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.DataCacheUnavailableException();
     }
     if (!this.m_odpContext.SnapshotProcessing)
     {
         if (this.m_odpContext.InSubreport)
         {
             this.m_odpContext.CreateAndSetupDataExtensionFunction.DataSetRetrieveForReportInstance(this.m_odpContext.ReportContext, this.m_parameters);
         }
         if (!this.m_retrievalManager.PrefetchData(reportInstance, this.m_parameters, mergeTransaction))
         {
             throw new ProcessingAbortedException();
         }
         reportInstance.NoRows = this.m_retrievalManager.NoRows;
     }
 }
Пример #20
0
 public bool PrefetchData(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance, ParameterInfoCollection parameters, bool mergeTran)
 {
     if (this.m_report.DataSourceCount == 0)
     {
         return(true);
     }
     try
     {
         bool flag = true;
         for (int i = 0; i < this.m_report.DataSourceCount; i++)
         {
             this.m_runtimeDataSources.Add(new RuntimeDataSourcePrefetch(this.m_report, reportInstance, this.m_report.DataSources[i], this.m_odpContext, mergeTran));
         }
         flag &= this.FetchData();
         if (this.m_report.ParametersNotUsedInQuery && this.m_odpContext.ErrorSavingSnapshotData)
         {
             for (int j = 0; j < parameters.Count; j++)
             {
                 parameters[j].UsedInQuery = true;
             }
             return(false);
         }
         return(flag);
     }
     catch
     {
         foreach (RuntimeAtomicDataSource runtimeDataSource in this.m_runtimeDataSources)
         {
             runtimeDataSource.EraseDataChunk();
         }
         throw;
     }
     finally
     {
         this.FinallyBlockForDataSetExecution();
     }
 }
Пример #21
0
 protected virtual void ResetEnvironment(OnDemandProcessingContext odpContext, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance)
 {
     odpContext.SetupEnvironment(reportInstance);
     odpContext.ReportObjectModel.AggregatesImpl.ResetAll();
 }
Пример #22
0
 protected abstract void PreProcessSnapshot(OnDemandProcessingContext odpContext, Merge odpMerge, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportSnapshot reportSnapshot);
Пример #23
0
 protected abstract void SetupReportLanguage(Merge odpMerge, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance);
Пример #24
0
        private bool InitSubReport(AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport subReport, IReference <AspNetCore.ReportingServices.ReportIntermediateFormat.SubReportInstance> subReportInstanceRef)
        {
            bool flag = true;

            AspNetCore.ReportingServices.ReportIntermediateFormat.SubReportInstance subReportInstance = subReportInstanceRef.Value();
            if (this.m_odpContext.SnapshotProcessing && subReportInstance.ProcessedWithError)
            {
                return(false);
            }
            try
            {
                if (!this.m_odpContext.SnapshotProcessing)
                {
                    subReportInstance.RetrievalStatus = subReport.RetrievalStatus;
                }
                if (subReportInstance.RetrievalStatus == AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport.Status.DefinitionRetrieveFailed)
                {
                    subReportInstance.ProcessedWithError = true;
                    return(false);
                }
                if (this.m_odpContext.CurrentReportInstance == null && subReport.Report != null)
                {
                    if (!this.m_odpContext.SnapshotProcessing)
                    {
                        subReport.OdpSubReportInfo.UserSortDataSetGlobalId = this.m_odpContext.ParentContext.UserSortFilterContext.DataSetGlobalId;
                    }
                    this.m_odpContext.UserSortFilterContext.UpdateContextForFirstSubreportInstance(this.m_odpContext.ParentContext.UserSortFilterContext);
                }
                if (this.m_odpContext.SnapshotProcessing && !this.m_odpContext.ReprocessSnapshot)
                {
                    AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance = subReportInstance.ReportInstance.Value();
                    this.m_odpContext.CurrentReportInstance = reportInstance;
                    this.m_odpContext.LoadExistingSubReportDataChunkNameModifier(subReportInstance);
                    reportInstance.InitializeFromSnapshot(this.m_odpContext);
                    this.Init(true, false);
                    this.m_odpContext.ThreadCulture = subReportInstance.ThreadCulture;
                    this.SetupReport(reportInstance);
                    this.m_odpContext.SetSubReportContext(subReportInstance, true);
                    this.m_odpContext.ReportRuntime.CustomCodeOnInit(this.m_odpContext.ReportDefinition);
                    this.m_odpContext.OdpMetadata.SetUpdatedVariableValues(this.m_odpContext, reportInstance);
                    return(flag);
                }
                AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance2 = this.PrepareReportInstance(subReportInstance);
                this.m_odpContext.CurrentReportInstance = reportInstance2;
                this.Init(true, false);
                subReportInstance.InstanceUniqueName = this.m_odpContext.CreateUniqueID().ToString(CultureInfo.InvariantCulture);
                this.m_odpContext.SetSubReportContext(subReportInstance, false);
                this.SetupReport(reportInstance2);
                this.m_parameters = OnDemandProcessingContext.EvaluateSubReportParameters(this.m_odpContext.ParentContext, subReport);
                bool flag2 = default(bool);
                if (!this.m_odpContext.SnapshotProcessing && !this.m_odpContext.ProcessWithCachedData)
                {
                    try
                    {
                        this.m_odpContext.ProcessReportParameters = true;
                        this.m_odpContext.ReportObjectModel.ParametersImpl.Clear();
                        AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.ProcessReportParameters(subReport.Report, this.m_odpContext, this.m_parameters);
                    }
                    finally
                    {
                        this.m_odpContext.ProcessReportParameters = false;
                    }
                    if (!this.m_parameters.ValuesAreValid())
                    {
                        subReportInstance.RetrievalStatus = AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport.Status.ParametersNotSpecified;
                        throw new ReportProcessingException(ErrorCode.rsParametersNotSpecified);
                    }
                    this.m_odpContext.ReportParameters = this.m_parameters;
                }
                else if (!this.m_parameters.ValuesAreValid(out flag2) && flag2)
                {
                    subReportInstance.RetrievalStatus = AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport.Status.ParametersNotSpecified;
                    throw new ReportProcessingException(ErrorCode.rsParametersNotSpecified);
                }
                this.Init(this.m_parameters);
                subReportInstance.Parameters = new ParametersImpl(this.m_odpContext.ReportObjectModel.ParametersImpl);
                this.m_odpContext.SetSubReportNameModifierAndParameters(subReportInstance, !this.m_odpContext.SnapshotProcessing);
                if (this.m_odpContext.ReprocessSnapshot)
                {
                    reportInstance2.InitializeFromSnapshot(this.m_odpContext);
                }
                this.EvaluateReportLanguage(reportInstance2, null);
                subReportInstance.ThreadCulture = this.m_odpContext.ThreadCulture;
                if (!this.m_odpContext.SnapshotProcessing || this.m_odpContext.FoundExistingSubReportInstance)
                {
                    flag = this.FetchSubReportData(subReport, subReportInstance);
                    if (flag)
                    {
                        subReportInstance.RetrievalStatus = AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport.Status.DataRetrieved;
                    }
                    else
                    {
                        subReportInstance.RetrievalStatus    = AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport.Status.DataRetrieveFailed;
                        subReportInstance.ProcessedWithError = true;
                    }
                }
                else
                {
                    subReportInstance.RetrievalStatus    = AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport.Status.DataNotRetrieved;
                    subReportInstance.ProcessedWithError = true;
                }
                this.m_odpContext.ReportParameters = null;
                return(flag);
            }
            catch (AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.DataCacheUnavailableException)
            {
                throw;
            }
            catch (Exception ex2)
            {
                flag = false;
                subReportInstance.ProcessedWithError = true;
                if (subReportInstance.ReportInstance != null)
                {
                    subReportInstance.ReportInstance.Value().NoRows = false;
                }
                if (ex2 is RSException)
                {
                    this.m_odpContext.ErrorContext.Register((RSException)ex2, subReport.ObjectType);
                    return(flag);
                }
                return(flag);
            }
        }
Пример #25
0
 protected void SetupInitialOdpState(OnDemandProcessingContext odpContext, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportSnapshot reportSnapshot)
 {
     reportSnapshot.HasUserSortFilter = this.ReportDefinition.ReportOrDescendentHasUserSortFilter;
     odpContext.SetupEnvironment(reportInstance);
 }
Пример #26
0
 public ReportInstance(Report reportDef, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance)
     : base(null)
 {
     this.m_reportDef      = reportDef;
     this.m_reportInstance = reportInstance;
 }
 protected override void PreProcessSnapshot(OnDemandProcessingContext odpContext, Merge odpMerge, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportSnapshot reportSnapshot)
 {
     base.SetupInitialOdpState(odpContext, reportInstance, reportSnapshot);
 }
        public void Initialize(AspNetCore.ReportingServices.ReportIntermediateFormat.Report report, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance)
        {
            int size = 0;

            if (report.Parameters != null)
            {
                size = report.Parameters.Count;
            }
            this.m_parameters = new ParametersImpl(size);
            this.InitializeGlobalAndUserCollections();
            this.m_currentFields = new FieldsContext(this);
            this.m_dataSources   = new DataSourcesImpl(report.DataSourceCount);
            this.m_dataSets      = new DataSetsImpl(report.DataSetCount);
            this.InitOrUpdateDataSetCollection(report, reportInstance, true);
            this.m_variables   = new VariablesImpl(false);
            this.m_aggregates  = new AggregatesImpl(false, this.m_odpContext);
            this.m_reportItems = new ReportItemsImpl(false);
            this.m_lookups     = new LookupsImpl();
        }
Пример #29
0
 public ReportInstance(Report reportDef)
     : base(null)
 {
     this.m_reportDef      = reportDef;
     this.m_reportInstance = null;
 }
        private int InitOrUpdateDataSetCollection(AspNetCore.ReportingServices.ReportIntermediateFormat.Report report, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance, bool initialize)
        {
            int result = 0;

            for (int i = 0; i < report.DataSourceCount; i++)
            {
                AspNetCore.ReportingServices.ReportIntermediateFormat.DataSource dataSource = report.DataSources[i];
                if (initialize && !dataSource.IsArtificialForSharedDataSets)
                {
                    this.m_dataSources.Add(dataSource);
                }
                if (dataSource.DataSets != null)
                {
                    for (int j = 0; j < dataSource.DataSets.Count; j++)
                    {
                        this.InitDataSet(reportInstance, dataSource.DataSets[j], ref result);
                    }
                }
            }
            return(result);
        }