Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Issue with using crystal 8.5 and crystal 13 simultanously in dependent apps

Hello All,

I am facing some issue with different crystal versions used in applications. My application(let's say X13) is using crystal 13.0.10.1385 dotnet API and another application (let's say Y85) is using crystal 8.5 dotnet API version. My application X13 has a module which is dependent on application Y85 module and exchange information between them.


As both applications use crystal, CRPE32.dll is loaded in memory once for both the applications. The issue derives from the fact that the application X13 brings the crpe32.dll (version 13.0.10.1385) located in folder “C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86” into memory. If the application X13 is not loaded into memory first then the version of crpe32.dll (i.e. 8.5.0.461) located in the application Y85 install folder will be used.


As we know that CR 13 and CR 8.5 are two entirely different API's now without any compatibility with each other. Now if my application X13 is initialized first and crpe32.dll (version 13.0.10.1385) is loaded in memory, on accessing the module dependent on application Y85, Y85 tries to make crystal calls.

It tries to call to PEOpenEngine, PEOpenPrintJob, PEGetNTables, PEGetNthTableLocation, crPEGetNthTableLogOnInfo and PEGetNDatabaseFields which executes fine but It is only the call to PEGetNthDatabaseFieldInfo that fails, with a return value of 0. Below is the sequence order of calls:


  1. A 2013 .NET Crystal Engine is initialized first using ReportDocument.Load method or CrystalEngine.CRPE.InitCrpe.
    1. Also note that calling CrystalEngine.CRPE.CloseCrpe has no positive effect of eliminating the issue.
  2. Subsequent calls to PEOpenEngine, PEOpenPrintJob, PEGetNTables, PEGetNthTableLocation, crPEGetNthTableLogOnInfo and PEGetNDatabaseFields all execute just fine.
  3. It is only the call to PEGetNthDatabaseFieldInfo that fails, with a return value of 0.

Question arises here is how to get PEGetNthDatabaseFieldInfo working when the .NET Crystal Engine has already been initialized.

  • Is there a separate declare we can add to our VB6 code that will be compatible with crpe32.dll version 13.0.10.1385?
  • Or can we load both crpe32.dll (version 13.0.10.1385 and 8.5.0.461) in parallel and instruct .NET crystal to use version 13 and other one to use version 8.5 dll?


I have attached a sample code demonstrating same too. It will be great if anyone can help me on this.


Crystal versions involved : 13.0.10.1385 and 8.5.0.461

Visual Studio 2012

VB.net

WIN APP



Thanks

Saurabh


Sample.txt.zip (1673 B)
Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question