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

            m_subreportDataSourcesCallback(reportContext, subreportPath, NeedsUpgrade, out subreportContext, out getCompiledDefinitionCallback2, out dataSources, out DataSetInfoCollection _);
            if (getCompiledDefinitionCallback2 != null)
            {
                if (ReportProcessing.ContainsFlag(getCompiledDefinitionCallback2.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(getCompiledDefinitionCallback2);
                getCompiledDefinitionCallback = @object.GetReportChunk;
            }
            else if (subreportContext == null)
            {
                throw new ReportProcessingException(RPRes.rsMissingSubReport(subreportPath, subreportPath), ErrorCode.rsItemNotFound);
            }
        }
 public override void Save()
 {
     lock (this)
     {
         if (m_newSnapshot != null && m_legacyChunkManager != null)
         {
             m_legacyChunkManager.SaveFirstPage();
             m_legacyChunkManager.SaveReportSnapshot(m_newSnapshot);
             m_newSnapshot = null;
         }
         if (m_renderingInfoChanged && m_renderingInfoManager != null)
         {
             ChunkFactoryAdapter @object = new ChunkFactoryAdapter(m_createChunkFactory);
             m_renderingInfoManager.Save(@object.CreateReportChunk);
             m_renderingInfoManager = null;
         }
     }
 }
Пример #3
0
        internal 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(reportContext != null, "(null != reportContext)");
            m_reportContext           = reportContext;
            m_requestUserName         = requestUserName;
            m_parameters              = parameters;
            m_queryParameters         = m_parameters.GetQueryParameters();
            m_subReportCallback       = subReportCallback;
            m_getResourceFunction     = getResourceFunction;
            m_chunkFactory            = createChunkFactory;
            m_interactiveExecution    = interactiveExecution;
            m_userLanguage            = culture;
            m_allowUserProfileState   = allowUserProfileState;
            m_initialUserProfileState = initialUserProfileState;
            m_reportRuntimeSetup      = reportRuntimeSetup;
            m_createStreamCallback    = createStreamCallback;
            m_isHistorySnapshot       = isHistorySnapshot;
            ChunkFactoryAdapter @object = new ChunkFactoryAdapter(m_chunkFactory);

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