Skip to Content
author's profile photo Former Member
Former Member

Export Crystal Report Crash Application from C# 4.0 App. Throw Unhandled exception

Using C# 4.0 Winform Application(32 bit) with Crystal Report 2011 with Crystal report .Net runtime "CRRuntime_32bit_13_0_16".

During exporting report into PDF. An unhandled win32 exception occurred.

A few time this works and next time throw unhandled error as below

Problem signature:

Problem Event Name: APPCRASH

Application Name: Application.vshost.exe

Application Version: 10.0.30319.1

Application Timestamp: 4ba2084b

**Fault Module Name: MSVCR80.dll**

Fault Module Version: 8.0.50727.6229

Fault Module Timestamp: 4ec352ab

Exception Code: c0000005

Exception Offset: 000173c1

OS Version: 6.1.7601.2.1.0.256.48

I am exporting this first then sending the file in mail as attachment.

Then I delete the file after export to pdf process end.

Once this process finished only then user is able to do another process.

The sample code is as below

if (m_ReportDocument != null)

m_ReportDocument.ExportToDisk(ExportFormatType.PortableDocFormat, fileName);

if (!File.Exists(fileName))

{ if (m_ReportDocument != null)

m_ReportDocument.Dispose();

return false;

}

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on May 30, 2016 at 12:57 PM

    That is normal behaviour, The engine is only capable of previewing, exporting or printing one report at a time.

    Work around is to spawn a thread for each output type. Or create a CR dll that you can pass a report to to do the job.

    Don

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2016 at 08:56 PM

    I need to know how to display the report in WinForm, I have used various versions of Crystal previously but with this I'm lost, not

    that libraries must be added in reference and type of View control.

    Thank you,

    CrystalActiveXReportViewer cr = new CrystalActiveXReportViewer();

    cr.ReportSource = "X:\\AppCropaExpress_VS2015\\Reportes\\Manifiesto.rpt";

    cr.ViewReport();

    // control para ver reporte

    axCR.ReportSource = "X:\\AppCropaExpress_VS2015\\Reportes\\Manifiesto.rpt";

    axCR.ViewReport();

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Antonio,

      Code you are using is using the RDC and ActiveX viewer.

      Create a new Windows Form project.

      Depending on the version of VS set the Project to 4.x Full Framework, not the Client.

      On the form click on Tool Bar, add Crystal Reports Viewer to the list by Choose Item....

      Framework tab and select CrystalReportsViewer version 13.

      Drop the Viewer onto the form and then add the Engine and Shared to start with.

      You can just add the viewer and use it to open reports, it has basic abilities.

      Search for KBA 2163438 or 2281780, I have attached sample app's for printing or DB and Parameters.

      Either one of them will get you going...

      Don

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.