rainforestnet / CrystalReportsNinja

A small Windows Console App that loads external Crystal Reports file, takes parameter inputs and export to various format or even print to printer
http://www.rainforestnet.com
93 stars 77 forks source link

Internal error when generating PDF in QA #55

Closed GHExplorer closed 3 years ago

GHExplorer commented 3 years ago

Hi,

We have a report that's correctly generating a PDF, in both Dev and Prod. But it's returning an error, in QA (also the same problem, with Staging).

It logs in, without a hitch. But when it gets to PerformOutput()/_reportDoc.Export()/ it errors out.

The command line parameters are the same, except for references to the QA database and credentials.

How can I dig deeper, to get more info? Do you think this is some structural field differences between Dev and QA?

I'm just looking for suggestions, on how to approach this.

'CrystalReportsNinja.exe' (CLR v4.0.30319: CrystalReportsNinja.exe): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.ReportSource\13.0.2000.0__692fbea5521e1304\CrystalDecisions.ReportSource.dll'. 'CrystalReportsNinja.exe' (CLR v4.0.30319: CrystalReportsNinja.exe): Loaded 'C:\WINDOWS\assembly\GAC_64\CrystalDecisions.ReportAppServer.CommonObjectModel\13.0.2000.0__692fbea5521e1304\CrystalDecisions.ReportAppServer.CommonObjectModel.dll'. Exception thrown: 'System.Runtime.InteropServices.COMException' in CrystalDecisions.CrystalReports.Engine.dll Exception thrown: 'CrystalDecisions.CrystalReports.Engine.InternalException' in CrystalDecisions.ReportAppServer.DataSetConversion.dll Exception thrown: 'CrystalDecisions.CrystalReports.Engine.InternalException' in CrystalReportsNinja.exe

mhertzfeld commented 3 years ago

First confirm that the same versions of ninja and the crystal reports runtimes are installed across your environments.

What version of ninja are you running? What is the version of the Crystal Runtimes installed on the servers?

The latest version of Ninja can be found at the link below. The parameters may be different than what you are using now depending on how old the version of ninja you are using is. The documentation on the main project page is decent. I would suggest starting there if you choose to upgrade to the latest.

https://github.com/mhertzfeld/CrystalReportsNinja https://github.com/mhertzfeld/CrystalReportsNinja/releases/tag/v1.8.0.0

GHExplorer commented 3 years ago

The one that I'm using is indeed the older one. It's from here:

https://github.com/rainforestnet/CrystalReportsNinja

, and it works on both my worksation and the server where it will be deployed. But it only works in Dev and Prod ; but there it works perfectly.

On that server where we will be deploying it, it won't be possible to upgrade the crystal runtime. I tried, and management of that server refuses to make any changes. But again, Dev and Prod work fine ; so even if I could escalate, they would ask why everything is working perfectly in Dev and Prod, and I wouldn't have an answer for them.

I tried the version from mhertzfeld that you shared, and as you say the parameters from the older version don't work, even in Dev/Prod.

So I guess the next step is to change the parameters, to match the requirements of the mhertzfeld version.

Unfortunately, I can no longer build it. This is unrelated to the thread, but yesterday I tried to update Visual Studio 2017 to the latest build. Little did I know, that Microsoft was upgrading to 2019. Now, there are missing components. So that complicates things, but it means that I have to use an executable that's already built.

Alright, I'll go through the docs at mhertzfeld, and see what the parameter difference are.

T & R,

GHExplorer commented 3 years ago

After weeks of chasing down rabbit holes, it looks like the problem was basically typos. Some of the entries in the tnsnames.ora were spelt wrong, and also at least one of the System DNSs wasn't configured properly. Everything is working fine, with the older version of CrystalRuntimeNinja.

Thanks everyone, for their suggestions.