0
votes

Recently I inherited a project from another developer / company. They have created a MVC application which uses Crystal Reports for the reporting. The problem is, I never worked with Crystal Reports before, I have done all my reporting using the SQL Report Server (Microsoft).

So my first question is, how can I edit the existing reports (.rpt files)? Do i need some special Crystal Reports software to open these files?

In the project transfer, beside the application source code itself, they supplied the Crystal Reports Runtime 12.2 executable. Though it seems I cant use this executable for editing existing reports.

The project itself already contained some DLL's for Crystal Reports, namely:

  • CrystalDecisions.CrystalReports.Engine
  • CrystalDecisions.ReportSource
  • CrystalDecisions.Shared
  • CrystalDecisions.Web

When I try to run the project on my developer system (without editing the reports or anything and after installing the runtime executable) I am getting the following error:

System.TypeInitializationException: 'The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.'

LoadSaveReportException: An Error Has Occured while attempting to load the Crystal Reports runtime

Either the Crystal Reports registry key permissions are insufficient or the Crystal Reports runtime is not installed correctly.

Please install the appropriate Crystal Reports redistributable (CRRedist*.msi) containing the correct version of the Crystal Reports runtime (x86, x64, or Itanium) required. 

The reports are working on the live server though (which has been configured by the company I inherited the project from).

With all the above in mind, what would be a viable option to get this working?

  1. Should I try to get the fairly old Crystal Reports (2008) working, although I don't even know if this is possible on a windows 10 machine and with Visual Studio 2019?
  2. Or should I buy a new license of Crystal Reports, I also don't know if i can even edit / open old rpt reports designed in the 2008R2 version with a new version of Crystal reports (and spend 500~ dollars for a license)?

In the future I will probably migrate the crystal reports to something I do know like the SQL report server, but for now this will be to much work (and some clients already requested report adjustments), and besides, to do this I will need to know what record sources the reports are using..

2

2 Answers

1
votes

The crystal report runtimes are only needed on computers where the reports will be executed.

Before you spend $500 on a license for the SAP Crystal Reports IDE, you could probably get by with using the free Add On for Visual Studio, assuming you have a valid license for Visual Studio. Each version of Visual Studio has an add on that can be installed that will allow you to use Visual Studio to develop and edit crystal reports. As long as the version you are using is more recent than the one the reports were developed in, then they should automatically convert to the more recent version. However, you can not edit a report using any version of the software that is older than the version used to create the report.

Converting the existing reports into SQL Reports could be a challenge if the reports have a high degree of complexity. There is no conversion tool to assist, so you will need to recreate each report in SQL Reports.

0
votes

For anyone interested. In the end we decided to migrate the report to a Report Server.

We received the tooling for the Crystal Reports 2008 SP2 (designer and runtime) from the other company and by installing the Runtime on our developing computer the error disappeared, however there were also a number of other bugs in the Crystal Report 2008 server and designer. The somewhat 'complicated' license model of Crystal Reports was also not very appealing to upgrade it to a newer Crystal report version.

Our main issue for not migrating to report server immediately was the dataset of the report being generated / filled in the backend of the application with several EF / Lambda queries. We are now investigating to keep those datasets intact by setting the datasource of the Report Server report with XML (and the EF / Lambda queries) instead of using a query as datasource.