2

I am downloading a Pdf file created by crystal report and I download as

 ReportDocument repDoc = ( ReportDocument ) System.Web.HttpContext.Current.Session["StudyReportCrystalDocument"];
        // 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, true, "StudyReport" );
        }
        catch( Exception ex )
        {
        }

Eventhough it is working But I got an exception

base {System.SystemException} = {Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.}

Can anyone explain what is the reason for this and how to override the exception?

1
  • It'd be helpful to have the ExportToHttpResponse method Commented Jun 10, 2009 at 23:08

2 Answers 2

1

Try this

Sign up to request clarification or add additional context in comments.

Comments

1

Remove the try-catch block.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.