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); }