1. Simone Olianti
  2. PowerBuilder
  3. Monday, 16 July 2018 09:16 AM UTC

Hi there, we are still using the old Crystal Reports 8.5 apis to elaborate reports from our pb application. Since latest cr versions have discontinued COM, is there any workaround out there to make it work from powerbuilder?

tia

Accepted Answer
Marco Meoni Accepted Answer Pending Moderation
  1. Monday, 16 July 2018 14:46 PM UTC
  2. PowerBuilder
  3. # Permalink

Hello Simone,

recent versions of CR do not expose anymore a COM interface, only .NET or Java SDKs.

That means PB applications cannot use anymore OLE to manipulate and display CR reports.

What you can do is to take the CR .NET SDK and call the new interfaces (visual and non-visual) by using MS Interop and expose them to COM.

Here the HowTos from Bruce:

https://www.appeon.com/developers/library/videos/using-net-visual-assemblies-powerbuilder.html

https://www.appeon.com/developers/library/videos/using-net-nonvisual-assemblies-powerbuilder.html

Best,

.m

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 24 July 2018 00:48 AM UTC
  2. PowerBuilder
  3. # 1

Hi Simone,

 

I faced the same problem you did, so 've made a Crystal Report Viewer control in C#. The code is a mess, since my first goal was to implement all of the powerbuilder OLE code into .Net without changing any of the existing twisted code, but it works.

You'd have to download Crystal Reports for Visual Studio 2013. I haven't tested yet the latest patches, since there was a problem with exporting Calibri fonts to Excel / PDF. Patch 18 fixed that problem and later patches broke it again. (I still have to checkout the latest CR path which I think is 23).

Though I cannot just send you a working ActiveX I can try to clean out as much code as possible and see if that helps. As Marco said, you have to wrap your functions in an ActiveX and export the functions you need.

You can than paste the activeX in a window and use OLE to call the functions.

 

MiguelL

Comment
  1. Simone Olianti
  2. Tuesday, 24 July 2018 06:48 AM UTC
thank you very much Miguel!
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.