I am trying to export Crystal ReportDocument using ExportToHttpResponse as follows:
report.ExportToHttpResponse(exportOptions, HttpContext.Current.Response, true, "test");
When I first tried to run this, I got a System.Threading.ThreadAbortException . After reading about how this is a known bug with ExportToHttpResponse in this question , I tried to implement the proposed solution for wrapping an operator in a try / catch block as follows:
try { report.ExportToHttpResponse(expOptions, HttpContext.Current.Response, true, "test"); } catch (System.Threading.ThreadAbortException e) { }
As I understand it, this should catch and ignore the error and continue. However, I still get a System.Threading.ThreadAbortException in the closing bracket of the catch statement. My question is why the exception is still thrown, although I seem to catch it, and how can I fix it so that the exception is ignored?
source share