Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8620

Re: ThreadAbortException when using ExportToHttpResponse

$
0
0

Runtime Version:  v2.0.50727

 

Visual Studio 2012 

 

Framework version 4

 

OS Windows 7

 

Note:  Code is executed from a window opened using javascript.  On page load the report name is pulled from the query string.  Once we know which report we want it executes the following code:

 

 

 

                    ContractLevelReport contractLevelReport = new ContractLevelReport();

 

 

                    DataTable dtContractLevelReport = DAL.ExecuteDataTable(CommandType.Text,

                        "Select * from vw_Product_Commission_Schedule ORDER BY Agent_Bonus_Level_Descripiton, Carrier_Description, Product_Description, Effective_Date  ");

 

 

                    contractLevelReport.SetDataSource(dtContractLevelReport);

 

 

                    //Response.Clear();

 

 

                    contractLevelReport.ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Response, false, "ContractLevelReport");

 

This code is wrapped in a try cacth block.   It generates a System.Threading.ThreadAbortException when the ExportToHeepResponse is called.


Viewing all articles
Browse latest Browse all 8620

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>