Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>To get around this issue from the web front end (which drove me crazy using the ReportViewer web control), I realised that SSRS returns the data as a byte array that you can then process. So capturing the stream in .NET you can write a method that does something like:</p> <pre><code>private byte[] ExportStream(string streamType, out string mimeType, out string extension) { Microsoft.Reporting.WebForms.Warning[] warnings; string[] streamids; string encoding; string deviceInfo = "&lt;DeviceInfo&gt;&lt;SimplePageHeaders&gt;True&lt;/SimplePageHeaders&gt;&lt;/DeviceInfo&gt;" byte[] bytes = ReportViewerClientReport.ServerReport.Render(streamType, deviceInfo, out mimeType, out encoding, out extension, out streamids, out warnings); return bytes; } </code></pre> <p>Then post-process the output from this method with something like the fantastic NPOI library from <a href="http://npoi.codeplex.com/" rel="nofollow noreferrer">http://npoi.codeplex.com/</a> either as bytes or create some kind of memory stream, then you can make it do whatever you want.</p> <p>Also- note that SSRS (Sql Server Reporting Services) R2 will have this feature, but it comes out in about May 2010. <a href="http://www.bidn.com/blogs/bretupdegraff/bidn-blog/234/new-features-of-ssrs-2008-r2-part-1-naming-excel-sheets-when-exporting-reports" rel="nofollow noreferrer">http://www.bidn.com/blogs/bretupdegraff/bidn-blog/234/new-features-of-ssrs-2008-r2-part-1-naming-excel-sheets-when-exporting-reports</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload