I've developed a sharepint webpart (ASP.NET 2.0 application) with use
of the CrystalReportVi ewer web control
(CrystalDecisio ns.Web.CrystalR eportViewer). All works fine except the
export of the report associated to the CrystalReportVi ewer. I use the
following source code:
CrystalDecision s.Web.CrystalRe portViewer crViewer = new
CrystalDecision s.Web.CrystalRe portViewer();
CrystalDecision s.Web.CrystalRe portSource crSource = new
CrystalDecision s.Web.CrystalRe portSource();
CrystalDecision s.CrystalReport s.Engine.Report Document crSource = null;
crSource.Report .FileName = reportFilename;
crDocument = crSource.Report Document;
this.Controls.A dd(crViewer);
//...some other stuff
//...
//here comes the export
ExportOptions options = new ExportOptions() ;
options.ExportF ormatType = ExportFormatTyp e.PortableDocFo rmat;
crDocument.Expo rtToHttpRespons e(options, this.Page.Respo nse, true,
"report");
The export itsself works but a ThreadAbortExce ption is thrown at the
ExportToHttpRes ponse method and the execution of the page stops.
I've already found that it is a new feature at ASP.NET 2.0 to abort
the thread at Response.End or Response.Redire ct (see http://
support.microso ft.com/kb/312629/EN-US/). But this doesn't really solve
my problem.
How can I prevent the ThreadAbortExce ption from being thrown?
Thanks, Dorrit
of the CrystalReportVi ewer web control
(CrystalDecisio ns.Web.CrystalR eportViewer). All works fine except the
export of the report associated to the CrystalReportVi ewer. I use the
following source code:
CrystalDecision s.Web.CrystalRe portViewer crViewer = new
CrystalDecision s.Web.CrystalRe portViewer();
CrystalDecision s.Web.CrystalRe portSource crSource = new
CrystalDecision s.Web.CrystalRe portSource();
CrystalDecision s.CrystalReport s.Engine.Report Document crSource = null;
crSource.Report .FileName = reportFilename;
crDocument = crSource.Report Document;
this.Controls.A dd(crViewer);
//...some other stuff
//...
//here comes the export
ExportOptions options = new ExportOptions() ;
options.ExportF ormatType = ExportFormatTyp e.PortableDocFo rmat;
crDocument.Expo rtToHttpRespons e(options, this.Page.Respo nse, true,
"report");
The export itsself works but a ThreadAbortExce ption is thrown at the
ExportToHttpRes ponse method and the execution of the page stops.
I've already found that it is a new feature at ASP.NET 2.0 to abort
the thread at Response.End or Response.Redire ct (see http://
support.microso ft.com/kb/312629/EN-US/). But this doesn't really solve
my problem.
How can I prevent the ThreadAbortExce ption from being thrown?
Thanks, Dorrit
Comment