Hi,
I am using Q1 2010 AJAX ASP.Net controls for development.
I have one RadGrid placed on page, and on ItemCommand event i am exporting crystal report to pdf (working with response) then it gives me an error like:
{Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.}
One thing to be note is that same is working on any event of asp control.
This happens when I use RadAjaxManager in my page.
My code for same is as below:
Please suggest to overcome this issue.
With Regards,
Naresh Goradara
I am using Q1 2010 AJAX ASP.Net controls for development.
I have one RadGrid placed on page, and on ItemCommand event i am exporting crystal report to pdf (working with response) then it gives me an error like:
{Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.}
One thing to be note is that same is working on any event of asp control.
This happens when I use RadAjaxManager in my page.
My code for same is as below:
| // Get the report document |
| CrystalDecisions.CrystalReports.Engine.ReportDocument repDoc = GetReportDocument(); |
| // Stop buffering the response |
| Response.Buffer = false; |
| // Clear the response content and headers |
| Response.ClearContent(); |
| Response.ClearHeaders(); |
| try |
| { |
| repDoc.ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Response, false, "Invoice"); |
| } |
| catch (System.Threading.ThreadAbortException ex1) |
| { |
| ex1 = null; |
| Response.End(); |
| } |
| catch (Exception ex) |
| { |
| ex = null; |
| } |
| finally |
| { |
| } |
Please suggest to overcome this issue.
With Regards,
Naresh Goradara