Monday, October 20, 2014

Cannot Add Reference To CrystalDecisions DLLS On VS 2010

Cannot add reference to CrystalDecisions.Shared, CrystalDecisions.ReportSource, CrystalDecisions.CrystalReports.Engine on VS 2010
I recently came across this situation where I had to print a report using crystal and VS2010
I had designed the report using Crystal Reports Designer. My task was to print the report on the click of the print button on my Win Form application.
First of all,Crystal doesn’t ship with VS 2010, you need to download and install this free exe from SAP Business Objects website
In the correct scenario , one can add the reference to to CrystalDecisions.Shared , CrystalDecisions.ReportSource, CrystalDecisions.CrystalReports.Engine using  Add Reference -> .NET tab .
However in my case I wasn’t seeing these dlls .
I tried adding them manually using browse and navigating to C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjectsEnterpriseXI 4.0\win32_x86\dotnet
But I was tsill getting the reference error. After googling for some time I stumbled on the following page :
And following the discussion, I clicked on my Project Properties and Changed my target platform to .NET Framework 4 from .NET Framework 4 Client Profile.

Copied From: http://lazytechtips.wordpress.com/2011/07/15/cannot-add-reference-to-crystaldecisions-dlls-on-vs-2010/

No comments:

Post a Comment