public void SubReportDataSourcesCallback(ICatalogItemContext reportContext, string subreportPath, out ICatalogItemContext subreportContext, out ReportProcessing.GetReportChunk getCompiledDefinitionCallback, out DataSourceInfoCollection dataSources)
        {
            getCompiledDefinitionCallback = null;
            IChunkFactory         chunkFactory          = null;
            DataSetInfoCollection dataSetInfoCollection = default(DataSetInfoCollection);

            this.m_subreportDataSourcesCallback(reportContext, subreportPath, this.NeedsUpgrade, out subreportContext, out chunkFactory, out dataSources, out dataSetInfoCollection);
            if (chunkFactory != null)
            {
                if (ReportProcessing.ContainsFlag(chunkFactory.ReportProcessingFlags, ReportProcessingFlags.OnDemandEngine))
                {
                    subreportContext = null;
                    getCompiledDefinitionCallback = null;
                    dataSources = null;
                    string text  = subreportPath.MarkAsPrivate();
                    string text2 = reportContext.ItemPathAsString.MarkAsPrivate();
                    Global.Tracer.Trace(TraceLevel.Warning, "The subreport '{0}' could not be processed.  Parent report '{1}' failed to automatically republish, or it contains a Reporting Services 2005-style CustomReportItem, and is therefore incompatible with the subreport. To correct this error, please attempt to republish the parent report manually. If it contains a CustomReportItem, please upgrade the report to the latest version.", text, text2);
                    throw new ReportProcessingException(ErrorCode.rsInvalidOperation, RPRes.rsEngineMismatchParentReport(ObjectType.Subreport.ToString(), text, null, text, text2));
                }
                ChunkFactoryAdapter @object = new ChunkFactoryAdapter(chunkFactory);
                getCompiledDefinitionCallback = @object.GetReportChunk;
                return;
            }
            if (subreportContext != null)
            {
                return;
            }
            throw new ReportProcessingException(RPRes.rsMissingSubReport(subreportPath, subreportPath), ErrorCode.rsItemNotFound);
        }
 public override void Save()
 {
     lock (this)
     {
         if (this.m_newSnapshot != null && this.m_legacyChunkManager != null)
         {
             this.m_legacyChunkManager.SaveFirstPage();
             this.m_legacyChunkManager.SaveReportSnapshot(this.m_newSnapshot);
             this.m_newSnapshot = null;
         }
         if (this.m_renderingInfoChanged && this.m_renderingInfoManager != null)
         {
             ChunkFactoryAdapter @object = new ChunkFactoryAdapter(base.m_createChunkFactory);
             this.m_renderingInfoManager.Save(@object.CreateReportChunk);
             this.m_renderingInfoManager = null;
         }
     }
 }
Esempio n. 3
0
        public ProcessingContext(ICatalogItemContext reportContext, string requestUserName, ParameterInfoCollection parameters, ReportProcessing.OnDemandSubReportCallback subReportCallback, IGetResource getResourceFunction, IChunkFactory createChunkFactory, ReportProcessing.ExecutionType interactiveExecution, CultureInfo culture, UserProfileState allowUserProfileState, UserProfileState initialUserProfileState, ReportRuntimeSetup reportRuntimeSetup, CreateAndRegisterStream createStreamCallback, bool isHistorySnapshot, IJobContext jobContext, IExtensionFactory extFactory, IDataProtection dataProtection)
        {
            Global.Tracer.Assert(null != reportContext, "(null != reportContext)");
            this.m_reportContext           = reportContext;
            this.m_requestUserName         = requestUserName;
            this.m_parameters              = parameters;
            this.m_queryParameters         = this.m_parameters.GetQueryParameters();
            this.m_subReportCallback       = subReportCallback;
            this.m_getResourceFunction     = getResourceFunction;
            this.m_chunkFactory            = createChunkFactory;
            this.m_interactiveExecution    = interactiveExecution;
            this.m_userLanguage            = culture;
            this.m_allowUserProfileState   = allowUserProfileState;
            this.m_initialUserProfileState = initialUserProfileState;
            this.m_reportRuntimeSetup      = reportRuntimeSetup;
            this.m_createStreamCallback    = createStreamCallback;
            this.m_isHistorySnapshot       = isHistorySnapshot;
            ChunkFactoryAdapter @object = new ChunkFactoryAdapter(this.m_chunkFactory);

            this.m_createReportChunkCallback = @object.CreateReportChunk;
            this.m_jobContext     = jobContext;
            this.m_extFactory     = extFactory;
            this.m_dataProtection = dataProtection;
        }