public override void RenderReportForPrint(string deviceInfo, NameValueCollection additonalParams, HttpResponse response)
        {
            MemoryStream lastMemoryStream = null;

            ReportDataOperation.SetStreamingHeaders(null, response);
            Warning[] array = default(Warning[]);
            this.m_localReport.Render("IMAGE", deviceInfo, (CreateStreamCallback) delegate
            {
                if (lastMemoryStream != null)
                {
                    this.SendPrintStream(lastMemoryStream, response);
                    lastMemoryStream.Dispose();
                    lastMemoryStream = null;
                }
                lastMemoryStream = new MemoryStream();
                return(lastMemoryStream);
            }, out array);
            this.SendPrintStream(lastMemoryStream, response);
            lastMemoryStream.Dispose();
            this.SendPrintStream(null, response);
        }
Esempio n. 2
0
 public static void StreamToResponse(Stream data, string mimeType, HttpResponse response)
 {
     ReportDataOperation.SetStreamingHeaders(mimeType, response);
     ReportDataOperation.StreamToResponse(data, response);
 }