on ‎2018 Oct 22 4:29 PM
I've been struggling for days now, trying to troubleshoot this common error, but no solutions I've seen have helped.
I have an existing Windows Service that imports and parses some XML data into a database. The service has been updated to use CR to create a PDF that is then emailed to a user (an email in the submitted XML data). The updated service is perfectly functional when running locally to test. However, it is not functional after being install on my production server - I'm receiving the seemingly common "Load Report Failed" error.
I've compared both the existing services and my newly updated service in VS, and they are identical (insofar as I know to check). Both include references to CrystalDecisions.CrystalReports.Engine and CrystalDecisions.Shared, and both old and updated service references are Runtime Version v2.0.50727, Version 13.0.3500.0. There is a bit of auto-generated code in my app.config:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="CrystalDecisions.Shared" publicKeyToken="692fbea5521e1304" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-13.0.3500.0" newVersion="13.0.3500.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
We've checked all permissions, the file path, etc. As said above, this WORKS running locally. We've isolated the exact line where the exception is being thrown to
rptDoc.Load(Constants.ReportInfo.RECEIPT_SUBMISSIONS_REPORT_PATH);
I've tried substituting the contents of the variable directly into .Load (server name removed):
rptDoc.Load(@"\\<SERVER>\e$\Spectrum\Reports\ReceiptsSubmission.rpt");
I've tried referencing it directly on the server:
rptDoc.Load(@"E:\Spectrum\Reports\ReceiptsSubmission.rpt");
Lastly, I've tried moving the .RPT to a completely different location:
rptDoc.Load(@"C:\CrystalReports\PDFs\ReceiptsSubmission.rpt");
The report location is absolutely correct, and every method above works without question when running locally.
I've looked at the installed version of the SAP Crystal Reports runtime engine for .NET Framework on both my local machine and my server. Locally, I have Version 13.0.23.2819 (64-bit). My server has Version 13.0.1.220 (both 32-bit and 64-bit). Could this be my issue? If it is, how should I correct it? I am fearful of updating the engine on the server in case it would break my other services currently running.
Request clarification before answering.
First, 13.0.1.220 is the first SP released a 3+ years ago and no longer supported nor is it supported on current Windows Servers.
See the Platforms PDF file for specifics: http://scn.sap.com/docs/DOC-21990
Uninstall SP 1 on both your PC and the server and install SP 23, then 13.0.3500.0 will be the correct version. It also means the minimum Framework version is now 3.5. You cannot mix SP 1 and SP 23 in the same app, it needs to be recompiled for it to work using SP 23, lots of changes and updates in SP 23.
Delete all files in your folder and when building the project turn off copy dll's local... I don't recall the exact option for this and where it's located...
Do not copy them onto the APP server, they should be installed with the MSI and GAC'd only, if not you can end up with mixing versions, which is not supported.
not clear if its' a Windows or WEB app but make sure your web.config or app.cong file is copied over as well. Then search and make sure it's the only one being loaded.
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.