ilich / MvcReportViewer

ASP.NET MVC Html Helpers for ReportViewer Control.
MIT License
280 stars 131 forks source link

How can I get a handle on the exported file when someone clicks the 'export' button from the report viewer. #174

Closed ilich closed 8 years ago

ilich commented 8 years ago

Hi,

I would like to know if there is a way I can get a handle on the exported file when someone clicks the 'export' button from the report viewer. I have a need to modify the exported excel file before returning it to the browser.

I know I can do this from the ReportRunnerExtension since it returns a FileStreamResult, but can I do this if the user is viewing the report, then clicks the export button from within the report viewer?

Thanks, Mark

ilich commented 8 years ago

Unfortunately it is not possible to intercept Excel rendering from MvcReportViewer. You should modify ReportViewer.aspx backend code to handle this.

Take a look to http://stackoverflow.com/questions/12241736/export-to-excel-using-reportviewer-built-in-feature