public ProcessingMessageList Render(string format, string deviceInfo, string paginationMode, bool allowInternalRenderers, IEnumerable dataSources, CreateAndRegisterStream createStreamCallback)
        {
            this.SetProcessingCulture();
            this.m_itemContext.RSRequestParameters.FormatParamValue = format;
            this.m_itemContext.RSRequestParameters.SetRenderingParameters(deviceInfo);
            this.m_itemContext.RSRequestParameters.PaginationModeValue = paginationMode;
            ReportProcessing    reportProcessing   = this.CreateAndConfigureReportProcessing();
            IRenderingExtension renderingExtension = this.CreateRenderer(format, allowInternalRenderers);
            //renderingExtension.Report = report;

            bool flag = false;

            if (format == null || this.m_executionSession.Snapshot == null)
            {
                this.ReinitializeSnapshot(null);
                flag = true;
            }
            SubreportCallbackHandler subreportHandler = this.CreateSubreportCallbackHandler();
            ProcessingContext        pc = this.CreateProcessingContext(this.m_executionSession.ExecutionInfo.ReportParameters, dataSources, this.m_executionSession.Credentials, this.m_executionSession.Snapshot, createStreamCallback, subreportHandler);

            AspNetCore.ReportingServices.ReportProcessing.RenderingContext rc = this.CreateRenderingContext();
            OnDemandProcessingResult onDemandProcessingResult = null;

            if (flag)
            {
                try
                {
                    if (renderingExtension == null)
                    {
                        onDemandProcessingResult = reportProcessing.CreateSnapshot(DateTime.Now, pc, null);
                    }
                    else
                    {
                        this.m_itemContext.RSRequestParameters.SetReportParameters(this.m_executionSession.ExecutionInfo.ReportParameters.AsNameValueCollectionInUserCulture);
                        onDemandProcessingResult = this.CreateSnapshotAndRender(reportProcessing, renderingExtension, pc, rc, subreportHandler, this.m_executionSession.ExecutionInfo.ReportParameters, this.m_executionSession.Credentials);
                    }
                }
                catch (Exception ex)
                {
                    this.m_executionSession.Snapshot = null;
                    throw;
                }
            }
            else if (renderingExtension != null)
            {
                onDemandProcessingResult = reportProcessing.RenderSnapshot(renderingExtension, rc, pc);
            }
            this.m_executionSession.SaveProcessingResult(onDemandProcessingResult);
            return(onDemandProcessingResult.Warnings);
        }
        protected ProcessingContext CreateProcessingContext(ParameterInfoCollection reportParameters, IEnumerable dataSources, DatasourceCredentialsCollection credentials, IChunkFactory chunkFactory, CreateAndRegisterStream createStreamCallback, SubreportCallbackHandler subreportHandler)
        {
            RuntimeDataSourceInfoCollection dataSourceInfoColl = null;
            RuntimeDataSetInfoCollection    dataSetInfoColl    = null;

            this.GetAllReportDataSourcesAndSharedDataSets(out dataSourceInfoColl, out dataSetInfoColl);
            return(this.m_dataRetrieval.CreateProcessingContext(this.m_itemContext, reportParameters, dataSources, dataSourceInfoColl, dataSetInfoColl, this.GetCompiledDataSet, credentials, subreportHandler.OnDemandSubReportCallback, new GetResourceForLocalService(this.Catalog), chunkFactory, this.m_reportRuntimeSetupHandler.ReportRuntimeSetup, createStreamCallback));
        }
 protected virtual OnDemandProcessingResult CreateSnapshotAndRender(ReportProcessing repProc, IRenderingExtension renderer, ProcessingContext pc, AspNetCore.ReportingServices.ReportProcessing.RenderingContext rc, SubreportCallbackHandler subreportHandler, ParameterInfoCollection parameters, DatasourceCredentialsCollection credentials)
 {
     return(repProc.RenderReport(renderer, DateTime.Now, pc, rc, null));
 }