Skip to Content
0

Crash with VS2017 and CR SP21

Oct 16, 2017 at 10:40 PM

377

avatar image
Former Member

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?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

6 Answers

Best Answer
Don Williams
Nov 03, 2017 at 02:58 PM
0

And what have you done to debug the issue?

Share
10 |10000 characters needed characters left characters exceeded
Mikael Kratz Oct 17, 2017 at 01:27 PM
0

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>

Share
10 |10000 characters needed characters left characters exceeded
Mikael Kratz Oct 18, 2017 at 06:53 AM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Different issue, post a new question.

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

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?

Share
10 |10000 characters needed characters left characters exceeded
Don Williams
Oct 20, 2017 at 10:30 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Oct 31, 2017 at 01:11 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded