Ejemplo n.º 1
0
        private void CheckRetrievalStatus(AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport.Status status)
        {
            AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport subReport = (AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport)base.m_reportItemDef;
            switch (status)
            {
            case AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport.Status.NotRetrieved:
            case AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport.Status.DefinitionRetrieveFailed:
                this.m_errorCode    = SubReportErrorCodes.MissingSubReport;
                this.m_errorMessage = RPRes.rsMissingSubReport(subReport.Name, subReport.OriginalCatalogPath);
                break;

            case AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport.Status.DataRetrieveFailed:
                this.m_errorCode    = SubReportErrorCodes.DataRetrievalFailed;
                this.m_errorMessage = RPRes.rsSubReportDataRetrievalFailed(subReport.Name, subReport.OriginalCatalogPath);
                break;

            case AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport.Status.DataNotRetrieved:
                this.m_errorCode    = SubReportErrorCodes.DataNotRetrieved;
                this.m_errorMessage = RPRes.rsSubReportDataNotRetrieved(subReport.Name, subReport.OriginalCatalogPath);
                break;

            case AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport.Status.ParametersNotSpecified:
                this.m_errorCode    = SubReportErrorCodes.ParametersNotSpecified;
                this.m_errorMessage = RPRes.rsSubReportParametersNotSpecified(subReport.Name, subReport.OriginalCatalogPath);
                break;

            default:
                this.m_errorCode    = SubReportErrorCodes.Success;
                this.m_errorMessage = null;
                break;
            }
            this.FinalizeErrorMessageAndThrow();
        }
Ejemplo n.º 2
0
 public override void SetNewContext()
 {
     base.SetNewContext();
     this.m_isNewContext       = true;
     this.m_noRows             = true;
     this.m_processedWithError = false;
     this.m_errorCode          = SubReportErrorCodes.Success;
 }
Ejemplo n.º 3
0
 public void RetrieveSubreport()
 {
     if (this.m_isNewContext)
     {
         if (base.m_isOldSnapshot)
         {
             AspNetCore.ReportingServices.ReportRendering.SubReport subReport = (AspNetCore.ReportingServices.ReportRendering.SubReport)base.m_renderReportItem;
             if (subReport.Report != null)
             {
                 if (this.m_report == null)
                 {
                     this.m_report = new Report(this, base.m_inSubtotal, subReport, base.m_renderingContext);
                 }
                 else
                 {
                     this.m_report.UpdateSubReportContents(this, subReport);
                 }
             }
             this.m_noRows             = subReport.NoRows;
             this.m_processedWithError = subReport.ProcessedWithError;
         }
         else
         {
             AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport subReport2 = (AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport)base.m_reportItemDef;
             RenderingContext renderingContext = null;
             try
             {
                 if (subReport2.ExceededMaxLevel)
                 {
                     this.m_errorCode    = SubReportErrorCodes.ExceededMaxRecursionLevel;
                     this.m_errorMessage = RPRes.rsExceededMaxRecursionLevel(subReport2.Name);
                     this.FinalizeErrorMessageAndThrow();
                 }
                 else
                 {
                     this.CheckRetrievalStatus(subReport2.RetrievalStatus);
                 }
                 if (base.m_renderingContext.InstanceAccessDisallowed)
                 {
                     renderingContext = this.GetOrCreateRenderingContext(subReport2, null);
                     renderingContext.SubReportHasNoInstance = true;
                 }
                 else
                 {
                     base.m_renderingContext.OdpContext.SetupContext(subReport2, base.Instance.ReportScopeInstance);
                     if (subReport2.CurrentSubReportInstance == null)
                     {
                         renderingContext = this.GetOrCreateRenderingContext(subReport2, null);
                         renderingContext.SubReportHasNoInstance = true;
                     }
                     else
                     {
                         AspNetCore.ReportingServices.ReportIntermediateFormat.SubReportInstance subReportInstance = subReport2.CurrentSubReportInstance.Value();
                         this.m_noRows             = subReportInstance.NoRows;
                         this.m_processedWithError = subReportInstance.ProcessedWithError;
                         if (this.m_processedWithError)
                         {
                             this.CheckRetrievalStatus(subReportInstance.RetrievalStatus);
                         }
                         AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance = subReportInstance.ReportInstance.Value();
                         renderingContext = this.GetOrCreateRenderingContext(subReport2, reportInstance);
                         renderingContext.OdpContext.LoadExistingSubReportDataChunkNameModifier(subReportInstance);
                         renderingContext.OdpContext.SetSubReportContext(subReportInstance, true);
                         reportInstance.SetupEnvironment(renderingContext.OdpContext);
                     }
                 }
             }
             catch (Exception e)
             {
                 this.m_processedWithError = true;
                 ErrorContext subReportErrorContext = null;
                 if (subReport2.OdpContext != null)
                 {
                     subReportErrorContext = subReport2.OdpContext.ErrorContext;
                 }
                 if (renderingContext == null && this.m_report != null)
                 {
                     renderingContext = this.m_report.RenderingContext;
                 }
                 AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.HandleSubReportProcessingError(base.m_renderingContext.OdpContext.TopLevelContext.ErrorContext, subReport2, subReport2.UniqueName, subReportErrorContext, e);
             }
             if (renderingContext != null)
             {
                 renderingContext.SubReportProcessedWithError = this.m_processedWithError;
             }
         }
         if (this.m_processedWithError)
         {
             this.m_noRows = false;
             if (this.m_errorCode == SubReportErrorCodes.Success)
             {
                 this.m_errorCode    = SubReportErrorCodes.ProcessingError;
                 this.m_errorMessage = RPRes.rsRenderSubreportError;
             }
         }
         this.m_isNewContext = false;
     }
 }