How to configure ReportViewer so it can be exported CSV in ASP.NET?

↘锁芯ラ 提交于 2019-12-07 17:12:24

问题


How to configure ReportViewer so it can be exported CSV in ASP.NET (ReportViewer that comes from VisualStudio 2005/2008)? So it will be apart of current drop downlist? At the moment, it's only for Excel and PDF but not CSV.

Thanks


回答1:


When you run Report Viewer in Local mode, you cannot export to anything other than PDF and Excel. If you want to be able to export to other formats, you need to run Report Viewer in Server Mode. The rendering is then done on the SQL server through extensions.

The only way to make Report Viewer export other formats in local mode, is by overriding the render class, and basically write a renderer yourself. This is quite complicated.

On a side note, you can also enable Word and HTML rendering through Reflection. Howerver, the rendering of images through this technique is a little sketchy. I tried doing this, and the images would not render properly.



来源:https://stackoverflow.com/questions/984617/how-to-configure-reportviewer-so-it-can-be-exported-csv-in-asp-net

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!