Export Straight to Excel

Stimulsoft Reports.WEB discussion
Post Reply
JordanLH270
Posts: 9
Joined: Wed Nov 28, 2012 7:59 pm

Export Straight to Excel

Post 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.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Export Straight to Excel

Post 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.
JordanLH270
Posts: 9
Joined: Wed Nov 28, 2012 7:59 pm

Re: Export Straight to Excel

Post by JordanLH270 »

Thanks!

My last question is which event property would I place the code in?

Best,
Jordan
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Export Straight to Excel

Post 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.
Post Reply