Skip to Content
avatar image
Former Member

Crash with VS2017 and CR SP21

I'm having issues with Crystal Reports crashing at runtime when generating a report since updating to CR Service Pack 21. I can open the RPT files in Visual Studio and make changes in there just fine, but my app crashes at runtime when generating the report. I haven't had this problem with any previous Crystal Reports service updates, and I've been using the same reports since Visual Studio 2010.

What I've tried already to resolve the issue:

1) Removed all previous CR DLL project references and replaced them with the new versions numbered 13.0.3500.0 .

2) Updated Visual Studio to version 15.4 .

3) Removed and reinstalled the full Crystal Reports SR21 Visual Studio installer.

4) Opened each RPT file in my project one at a time, made a small change, then saved it.

5) Performed a Clean and full Rebuild of my project.

Any suggestions?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Best Answer
    Nov 03, 2017 at 02:58 PM

    And what have you done to debug the issue?

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 17, 2017 at 01:27 PM

    Take a look in your config file. If you use ADO.NET dataset as source then you must clear the previous legacy mode


    <startup useLegacyV2RuntimeActivationPolicy = "true">
    <supportedRuntime version = "v4.0" />
    </ Startup>

    Use only

    <startup>

    <supportedRuntimeversion = "v4.0" sku = ".NETFramework, Version = v4.6.2" />

    </ Startup>

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 18, 2017 at 06:53 AM

    Has no more suggestions in that case. I saw that you had done all the steps according to the upgrade document except for legacy mode. Take away legacy mode fixed my reports in winform. Hope someone on SAP can help you. I also have a problem with SP21. After upgrading, me and my customers suffers from strange formatting when exporting to Word, check this link.

    https://answers.sap.com/questions/321276/export-to-word-problem.html

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 17, 2017 at 08:47 PM

    Well, I definitely far exceed the system requirements for Crystal Reports. I'm running Windows 10 Professional on a 3.5Ghz six core Intel Xeon with 32 GB of RAM.

    As for ADO.NET legacy mode, I'm not using ADO.NET. In each RPT file, the data source is set to an XSD schema definition file. Then at generation time, I pass a filled DataSet that conforms to the XSD schema into Crystal Reports object's "SetDataSource" function. It's worked fine with no problems until Service Pack 21.

    Example:

    CRInpatientReport InRpt = new CRInpatientReport();
    DataSet ds = FetchInpReportData();
    InRpt.SetDataSource(ds);
    InRpt.Refresh();
    InRpt.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Filename);

    In terms of configuration, it's an ASP.NET application targeting .NET Framework 4.6.1 . The only config file is web.config, which currently has the following keys for defining framework version:

    <system.web>
    <compilation debug="true" targetFramework="4.6.1" />
    <httpRuntime targetFramework="4.5" />
    </system.web>

    Could one of these keys be the problem?

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 20, 2017 at 10:30 PM

    Hi Daniel,

    Actually you are using ADO.NET when you set the reports data source to a Dataset.

    At what point does the app crash?

    Use DebugDiag and see if it catches more info.

    Don

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 31, 2017 at 01:11 AM

    Hi Don:

    I have the same trouble, it crash in the set datasource, it is an asp.net project, and i don't have any tag LegacyMode.

    Add comment
    10|10000 characters needed characters exceeded