cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports Add-In with .NET framework 4.0

Former Member
0 Kudos

I did have a working CR add-in (Crystal Reports 2008), based on .net framework 3.5

Did reference the following CrystalDecisions dlls:

- CrystalDecisions.CrystalReports.Engine

- CrystalDecisions.ReportAppServer.ClientDoc

- CrystalDecisions.ReportAppServer.Controllers

- CrystalDecisions.ReportAppServer.DataDefModel

- CrystalDecisions.ReportAppServer.DataSetConversion

- CrystalDecisions.Shared

- DotNetExternalCommandAdapter

Now I did set the VS2010 project to .net framework 4.0., and got 8 errors:

Error 1 Warning as Error: A reference was created to embedded interop assembly 'c:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet\CrystalDecisions.ReportAppServer.ClientDoc.dll' because of an indirect reference to that assembly created by assembly 'c:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet\CrystalDecisions.ReportAppServer.DataSetConversion.dll'. Consider changing the 'Embed Interop Types' property on either assembly. CscMyAddIn

So i did set the 'Embed Interop Types' of the particular references dlls' to False.

Then I got 2 errors:

Error 1 Cannot embed interop types from assembly 'c:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet\CrystalDecisions.CrystalReports.Engine.dll' because it is missing the 'GuidAttribute' attribute c:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet\CrystalDecisions.CrystalReports.Engine.dll CscMyAddIn

Also set this 'Enbed Interop Types' to false.

But after build, and copy the addin dll to the right AddIn directory, the addin is not working in CR. The 'Add-ins' menu is not even shown in CR 2008.

So my question, is it possible to make a .net 4.0 based add-in? Or should I stick to .net 3.5?

After convert

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Dennis,

CR 2008 is only supported in VS 2008 and 3.5 framework. If you are going to use CR for VS 2010 then be sure to set your framework to full 4.0 and not the client. Also set your CPU to x86, don't use AnyCPU setting.

Thank you

Don

Former Member
0 Kudos

Hi Don,

Thanks for the quick answer... but...

Did just that. Set to full .net framework 4.0, platform target is x86.

I turned 'treat warnings as errors' off, so i do not get the errors about 'Embed Interop Types'

Also turned off 'Code Analysis' and turned off 'Signing'.

Did build the addin, started CR2008, but the add-in menu is still not there.

Use CR 2008 version 12.2.0.290

So still not able to make an addin in VS2010 based on .net framework 4.0.

Maybe something to do with the DotNetExternalCommandAdapter.dll? Because its runtime version is v1.1.4322?

0 Kudos

I meant that if you use VS 2010 to use CR for VS 2010. Cr 2008 only supports 3.5 framework and lower therefore if you try to use VS 2010 it too must be set to 3.5 framework. And VS 2010 only supports CR for VS 2010.

You can also update CR 2008 to SP3.

Thank you

Don

Adam_Stone
Active Contributor
0 Kudos

I expect that the addin won't work because you are using a newer version of the API than what the designer would expect for this addin. I would holdoff on this until the next version of the designer is released.

Former Member
0 Kudos

Ok, so i will (for now) use the .net framework 3.5 for our addin in CR 2008.

Former Member
0 Kudos

I love you Don!!!!

Thanks for the Tip!

Denis

Answers (0)