Example #1
0
        internal bool FetchSubReportData(Microsoft.ReportingServices.ReportIntermediateFormat.SubReport subReport, Microsoft.ReportingServices.ReportIntermediateFormat.SubReportInstance subReportInstance)
        {
            Microsoft.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance = subReportInstance.ReportInstance.Value();
            reportInstance.ResetReportVariables(subReport.OdpContext);
            bool flag;

            try
            {
                FetchData(reportInstance, subReport.MergeTransactions);
                if (subReport.OdpContext.ReprocessSnapshot && reportInstance.IsMissingExpectedDataChunk(subReport.OdpContext))
                {
                    flag = false;
                }
                else
                {
                    if (subReport.OdpContext.ReprocessSnapshot && !subReport.InDataRegion)
                    {
                        PreProcessTablixes(subReport.Report, subReport.OdpContext, onlyWithSubReports: false);
                    }
                    flag = true;
                }
            }
            catch (ProcessingAbortedException)
            {
                flag = false;
            }
            if (flag)
            {
                reportInstance.CalculateAndStoreReportVariables(subReport.OdpContext);
            }
            return(flag);
        }
 protected override void PreProcessSnapshot(OnDemandProcessingContext odpContext, Merge odpMerge, Microsoft.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance, Microsoft.ReportingServices.ReportIntermediateFormat.ReportSnapshot reportSnapshot)
 {
     SetupInitialOdpState(odpContext, reportInstance, reportSnapshot);
     if (base.ReportDefinition.HasSubReports)
     {
         SubReportInitializer.InitializeSubReportOdpContext(base.ReportDefinition, odpContext);
         SubReportInitializer.InitializeSubReports(base.ReportDefinition, reportInstance, odpContext, inDataRegion: false, fromCreateSubReportInstance: false);
     }
     PreProcessTablices(odpContext, reportSnapshot);
     reportInstance.CalculateAndStoreReportVariables(odpContext);
     odpContext.OdpMetadata.SetUpdatedVariableValues(odpContext, reportInstance);
 }
 protected override void PreProcessSnapshot(OnDemandProcessingContext odpContext, Merge odpMerge, Microsoft.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance, Microsoft.ReportingServices.ReportIntermediateFormat.ReportSnapshot reportSnapshot)
 {
     if (base.ReportDefinition.HasSubReports)
     {
         ReportProcessing.FetchSubReports(base.ReportDefinition, odpContext.ChunkFactory, odpContext.ErrorContext, odpContext.OdpMetadata, odpContext.ReportContext, odpContext.SubReportCallback, 0, odpContext.SnapshotProcessing, odpContext.ProcessWithCachedData, base.GlobalIDOwnerCollection, base.PublicProcessingContext.QueryParameters);
         SubReportInitializer.InitializeSubReportOdpContext(base.ReportDefinition, odpContext);
     }
     odpMerge.FetchData(reportInstance, mergeTransaction: false);
     reportInstance.CalculateAndStoreReportVariables(odpContext);
     if (base.ReportDefinition.HasSubReports)
     {
         SubReportInitializer.InitializeSubReports(base.ReportDefinition, reportInstance, odpContext, inDataRegion: false, fromCreateSubReportInstance: false);
     }
     SetupInitialOdpState(odpContext, reportInstance, reportSnapshot);
     if (base.ReportDefinition.HasSubReports || (!base.ReportDefinition.DeferVariableEvaluation && base.ReportDefinition.HasVariables))
     {
         Merge.PreProcessTablixes(base.ReportDefinition, odpContext, onlyWithSubReports: true);
     }
 }