cancel
Showing results for 
Search instead for 
Did you mean: 

Problems using .NET to invoke CR 2013 vs CR 2008. Class

Former Member
0 Kudos

Got a customer with an application that integrates via .NET with CR.  They have code that worked with CR 2008 and are running into issues not that they are using CR 2013.  They just upgraded to BOE 4.1 from 3.1x and their programmatic invocation of reports is broken.

They have been spinning their wheel with SAP Support and getting frustrated.

Thought maybe one of you gurus might recognize this issue.  Is it a path setting,  a 64-bit vs 32 bit thing,  wrong version of CR etc?  The original class ReportDocument has a bunch of methods that don't seem to be supported any longer?  Is there a merge module, DLL missing?  See their problem description below:

"

We upgraded from BO 3.1 SP5 to BO 4.1 SP6. Within our .Net application,  we are invoking Crystal Reports 2008 (now Crystal 2013) through code but are encountering errors.   Below are the latest from our developer.  Please let me know if you can offer some assistance or point us to the right direction if you have seen similar error in the past.  Thanks in advance.   –

Latest:

  1. 1.       Exception: “Could not load file or assembly 'BusinessObjects.Enterprise.Sdk' or one of its dependencies. An attempt was made to load a program with an incorrect format.”

Still outstanding, waiting for the input from the BO team.

  1. 2.       A first chance exception of type 'CrystalDecisions.CrystalReports.Engine.LoadSaveReportException' occurred in CrystalDecisions.CrystalReports.Engine.dll

Additional information: Invalid report file path.

As per the suggestion given, ReportClientDocument class was used instead of ReportDocument class. But there are multiple properties/functions which are not available in the new class (and are widely used in the solution) but were available in ReportDocument as below:

  • oRptDocument.ReportDefinition.ReportObjects
  • oRptDocument.SetDataSource
  • oRptDocument.SetParameterValue
  • oRptDocument.RecordSelectionFormula

Can’t we have a solution to the existing problem in such a way that instead of using new class we should go ahead with existing class only (and sort out the issue with creating an instance of ReportDocument class).

"

I'm sure somebody can recognize this error - any suggestions would be appreciated.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor
0 Kudos

There were a LOT of changes in the .NET SDK between 3.1 and 4.x.  Here are a couple of suggestions:

1.  BusinessObjects.Enterprise.SDK is probably not required - remove the reference and see whether it breaks anything.  If it does, post the code here and we may be able to tell you a different way to do it.

2.  Make sure that the project targets a full .NET framework, NOT one of the "Client" frameworks.

3.  What exactly are they trying to do with the SDK?  There may be sample code available or one of us may be able to provide the logic required..

4.  When targeting .NET 4.x, there is a new property on the referenced assemblies called "Embed Interop Types".  By default, this is set to true, but it needs to be false in order for code with the SDK to compile correctly.

-Dell

Answers (1)

Answers (1)

0 Kudos

Hi Andrew,

Are you an OEM Partner and what is the case number?

First, they cannot use 3.1 SDK to connect to 4.1.

Using CR 2008 reports are fine with BOE 4.1.

They cannot use CR for VS to connect to BOE, it does not include the Enterprise dll's required to connect to a BOE Server. To query the BOE CMS Server to get the report object by ID or GUID.

CR 2013 does not come with any SDK packages, they must go to Service Market place and download the 4.1 .NET SDK package.

Check the references in their application, they must all be version 14.1.x.x.

Don