cancel
Showing results for 
Search instead for 
Did you mean: 

PDF export in Crystal with .net

0 Kudos

hello all!

My application has errors when exporting a crystal report to PDF.

following scenario: After generate the reports on screen (any report of PRS tool), selecting the option of exporting it, the format ".pdf" is not working properly on production environment popping out an error of "Object reference not set to an instance of an object ;

Dev and QA environments are working correctly being possible to export the reports in any format. By analyzing it, we've checked the following possibilities:

Permissions: We've compared the permissions on the server folders for DEV, QA and PROD. In all environments the permissions are set to "Everyone has full access";

Crystal Reports or .NET version: o Even though the servers have the same configuration, we've compared the versioning of Crystal Reports installed on them and also the .NET version. All the environments have the same versions of Crystal Reports and .NET installed. o A test was performed installing other versions of Crystal Reports (upgrading and downgrading) on the PRD environment but the problem persisted.

Fonts: By consulting some forums on internet we saw that similar issues were caused by a specific version of fonts installed on the server; All installed fonts were reviewed and the "problematic" fonts were not encountered on any of the servers;

Database: There was a suspicious that the Databases from QA and PRD could have some difference on the configuration or even the data stored on it that could be causing the issue. In order to confirm it we've pointed the QA application to the PRD database and tested the reports. The export run correctly not showing any issues.

By all those verification, it's most likely that the issue or at least the indication of the issue is inside Crystal Reports code. Since we do not have access or knowledge about this coding, the suggestion would be to involve the support of Crystal Reports directly, which means, involve SAP team.

Versions being used on the solution:

Quality enviroment

.NET Framework: 4.5.2

Crystal: https://lh3.googleusercontent.com/-3ZJSX2_52zE/XNq1EwXSXQI/AAAAAAAAAKc/0Lpyv86UY_gMqg0u6AwJR4ATYjPJjKZEgCK8BGAs/s0/2019-05-14.png

SQL: Microsoft SQL Server 2014 (SP2) (KB3171021) - 12.0.5000.0 (X64) Jun 17 2016 19:14:09 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600:) (Hypervisor)

Production enviroment

.NET Framework: 4.5.2

Crystal: https://lh3.googleusercontent.com/-7I0YLw2Qr5k/XNq2LBk2nWI/AAAAAAAAAKo/sWDCj9FbRMguZPdbFmGTYme2z6bVjAILgCK8BGAs/s0/2019-05-14.png

SQL: Microsoft SQL Server 2014 (SP2) (KB3171021) - 12.0.5000.0 (X64) Jun 17 2016 19:14:09 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600:) (Hypervisor)

Screenshot of error only in production enviroment:

Can someone help me?

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Read the info on the page for SP 21, lots of updates so it's better to recompile using the updated runtime.

Answers (2)

Answers (2)

0 Kudos

@Don Williams, tks for you repply. One question:
After instalation of support pack into server, do you know if must have any change in Web.Config?

0 Kudos

There is no SDK with CR 2016 or the Viewer.

You can get it from here:

https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads