unable to evaluate expression because the code is optimized
Posted: Thu Mar 26, 2015 7:06 am
Dear,
I am using the below methods and all are throwing the exception "unable to evaluate expression because the code is optimized or a native frame is on top of the call stack":
1. StiReportResponse.ResponseAsXls(this.Page, rptReport, stiExcelSettings);
2. StiReportResponse.ResponseAsPdf(this.Page, rptReport, true, stiPdfSettings);
3. StiReportResponse.ResponseAsHtml(this.Page, rptReport, true, settings, null);
I tried using rptReport.ExportDocument(StiExportFormat.Pdf, "file") but I am referencing the Report as a dll and not using the .mrt file and i don't need to save the report in a specific location, I only need to open the report in Excel, PDF, or HTML.
What would be the solution for this issue?
Thank you
Charles.
I am using the below methods and all are throwing the exception "unable to evaluate expression because the code is optimized or a native frame is on top of the call stack":
1. StiReportResponse.ResponseAsXls(this.Page, rptReport, stiExcelSettings);
2. StiReportResponse.ResponseAsPdf(this.Page, rptReport, true, stiPdfSettings);
3. StiReportResponse.ResponseAsHtml(this.Page, rptReport, true, settings, null);
I tried using rptReport.ExportDocument(StiExportFormat.Pdf, "file") but I am referencing the Report as a dll and not using the .mrt file and i don't need to save the report in a specific location, I only need to open the report in Excel, PDF, or HTML.
What would be the solution for this issue?
Thank you
Charles.