Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,
I'm using VS2019 with Crystal Reports version 13.0.3500.0. When I'm trying to create a pdf on production machine i get the following error "Error message: Unable to cast COM object of type 'CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass' to interface type 'CrystalDecisions.ReportAppServer.Controllers.ISCRReportSource'. This operation failed because the QueryInterface call on the COM component for the interface with IID".

I opened my project on VS2015, convert Crystal Reports to 13.0.2000.0 and everything works fine on production machine.

Is there a solution for this error without going back to VS2015? I can't update CR on production machine, because I might have errors on the other applications running with CR 13.0.2000.0 version.

Thank you in advance.

What I have tried:

I added to app.config the dependency lines based on this article but I still get the same error: Crystal Reports, Developer for Visual Studio Downloads - Business Intelligence (BusinessObjects) - Community Wiki[
Posted
Updated 28-Jan-20 21:42pm

1 solution

You say you can't update CR on the prod machine, then don't build with a newer version on your dev machine! :-)

The new version of CR is likely to be backward compatible but old versions cannot cope with new functionality they know nothing about.

Try targeting an earlier version of .NET in your build and check the framework version on the production machine - note
Quote:
As of SP 26 we no longer support .Net Framework 3.5 and recommend upgrading to 4.5.2 or above
I personally would set up a machine (probably virtual) with the new versions and regression test the "other applications", then bite the bullet and upgrade across the board.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900