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
I've tried substituting the contents of the variable directly into .Load (server name removed):
I've tried referencing it directly on the server:
Lastly, I've tried moving the .RPT to a completely different location:
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 18.104.22.16819 (64-bit). My server has Version 22.214.171.124 (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.