Page 1 of 1
Export Straight to Excel
Posted: Tue Apr 30, 2013 9:55 pm
by JordanLH270
In my company's web application we have a button that loads the selected report in the Report Viewer. Is there a way to skip loading the report in the Report Viewer and instead Export the report directly into excel when clicking the button? I am looking for an event property and the coding for this report only. For all my other reports I would like the Report Viewer to load, but this one is the exception.
The report only contains one page.
Thank you.
Re: Export Straight to Excel
Posted: Thu May 02, 2013 2:46 pm
by HighAley
Hello.
You could export report to Excel without viewer with one of next methods:
Code: Select all
StiReportResponse.ResponseAsExcel2007(this.Page, report);
StiReportResponse.ResponseAsExcel2007(this.Page, report, settings);
Thank you.
Re: Export Straight to Excel
Posted: Thu May 02, 2013 7:20 pm
by JordanLH270
Thanks!
My last question is which event property would I place the code in?
Best,
Jordan
Re: Export Straight to Excel
Posted: Fri May 03, 2013 10:59 am
by HighAley
Hello, Jordan.
JordanLH270 wrote:My last question is which event property would I place the code in?
You should out this code in the onClick event of your button.
Thank you.