コード例 #1
0
 public Stream RenderReportHTML(NameValueCollection deviceInfo, PageCountMode pageCountMode, out string scrollScript, out string pageStyle)
 {
     this.m_htmlStreamCache.Clear();
     using (AspNetCore.Reporting.StreamCache streamCache = new AspNetCore.Reporting.StreamCache(this.CreateStreamCallback))
     {
         try
         {
             LocalHtmlRenderer.Render(deviceInfo, pageCountMode, this, this.GetStreamCallback(streamCache), out scrollScript, out pageStyle);
         }
         finally
         {
             streamCache.MoveSecondaryStreamsTo(this.m_htmlStreamCache);
         }
         return(streamCache.GetMainStream(true));
     }
 }
コード例 #2
0
        public override Stream RenderReport(string format, bool allowInternalRenderers, string deviceInfo, NameValueCollection additionalParams, bool cacheSecondaryStreamsForHtml, out string mimeType, out string fileNameExtension)
        {
            using (AspNetCore.Reporting.StreamCache streamCache = new AspNetCore.Reporting.StreamCache())
            {
                PageCountMode pageCountMode = PageCountMode.Estimate;
                if (additionalParams != null && string.Compare(additionalParams["rs:PageCountMode"], PageCountMode.Actual.ToString(), StringComparison.OrdinalIgnoreCase) == 0)
                {
                    pageCountMode = PageCountMode.Actual;
                }
                Warning[] array = default(Warning[]);
                this.m_localReport.InternalRender(format, allowInternalRenderers, deviceInfo, pageCountMode, (AspNetCore.ReportingServices.Interfaces.CreateAndRegisterStream)streamCache.StreamCallback, out array);
                if (cacheSecondaryStreamsForHtml)
                {
                    streamCache.MoveSecondaryStreamsTo(base.m_htmlStreamCache);
                }

                return(streamCache.GetMainStream(true, out Encoding text, out mimeType, out fileNameExtension));
            }
        }