1. IT Crew
  2. PowerBuilder
  3. Thursday, 22 October 2020 14:00 PM UTC

Hello,

as we used an older PB version using the crpe32.dll to show reports created with Crystal Reports, we migrated it to the latest PB 2019 R2 Build 2353.

Now we also want to migrate the Crystal Reports features to use CrystalReports for .NET Framework 4.0.

But, when trying to import with the new .NET DLL Importer, there are lots of DLLs with many classes and functions, so for us it is not quite clear which are needed and how to integrate. As mentioned before, we only want to display reports by using the CrystalReportViewer.

I tried the following DLLs which were provided by SAP and imported them:
- CrystalDecisions.CrystalReports.Engine.dll
- CrystalDecisions.Shared.dll
- CrystalDecisions.Windows.Forms.dll

But after the Import only non-visual objects were created, and even after creating them in PowerScript, the access results in an error saying "... Object instance does not exist at line ... in function ... of object nvo_crystalreportviewer.. ...".

Does anybody has experience on how to do this or is there an example how to manage?

Any help is appreciated, so thanks in advance

BR Olaf

Marco Meoni Accepted Answer Pending Moderation
  1. Thursday, 22 October 2020 14:14 PM UTC
  2. PowerBuilder
  3. # 1

Hello,

I used MS Interop to load CR .NET viewer, and it worked for me.

Here the how-tos from Bruce:

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

Best,

.m

Comment
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Thursday, 22 October 2020 14:23 PM UTC
  2. PowerBuilder
  3. # 2

.NET DLL Importer is for importing non-visual DLLs.  You cannot import the Crystal Reports viewer.  Also, usually you need to create wrapper for the DLL so it meets the requirements documented:

https://docs.appeon.com/pb2019r2/application_techniques/ch20s01.html

For what you are trying to do, I think you need to create a COM wrapper yourself and embed in your app as outlined here:   

https://community.appeon.com/index.php/articles-blogs/tutorials-articles/2-powerbuilder/165-using-visual-net-components-in-powerbuilder

If at all possible, I would dump Crystal reports and go with something that is HTML.  Then you can load and interact with it in the new Chromium WebBrowser control: 

https://docs.appeon.com/pb2019r2/objects_and_controls/ch02s150.html

https://docs.appeon.com/pb2019r3/whats_new/WebBrowser_enhancements.html

 

 

 

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 22 October 2020 14:55 PM UTC
Another alternative suggestion to Armeen's HTML mention could be to use Appeon's InfoMaker product instead of Crystal.
  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 22 October 2020 16:34 PM UTC
I agree, you're both right. I tried to get away from SAP as much as possible, but once customers are using Crystal they seem to be stuck and don't feel like having to convert hundreds of existing reports. :(
  1. Helpful
  1. IT Crew
  2. Friday, 23 October 2020 06:07 AM UTC
Thanks for your response and the comments on it - unfortunately I agree to Miguel - there are several reports which they are actually using and want to use in the future.

I will work on the suggestions Armeen made and hope I can manage ;-)
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 22 October 2020 14:33 PM UTC
  2. PowerBuilder
  3. # 3

Let us know if you need help, I've had to do the exact same things a few years ago.

Comment
  1. Miguel Leeuwe
  2. Monday, 26 October 2020 12:23 PM UTC
Okay, I'll try to get some stuff for you this evening, I think I'll start with the visual control, since you can always add it as a control to your window and not show it.
  1. Helpful
  1. Miguel Leeuwe
  2. Monday, 26 October 2020 17:18 PM UTC
Meanwhile, which database are you using? Oracle, Sqlserver, ... ?
  1. Helpful
  1. IT Crew
  2. Tuesday, 27 October 2020 07:03 AM UTC
We are using Oracle 12c Release 12.1.0.1.0
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Monday, 26 October 2020 17:16 PM UTC
  2. PowerBuilder
  3. # 4
Comment
  1. Miguel Leeuwe
  2. Tuesday, 27 October 2020 09:31 AM UTC
Hi IT Crew,

It's been a looooong night and in the middle of a restore of my windows partition, but I've been doing things for you.

Give me some time to get more coffee my boss of my back and I'll be with you.

Please send me an email to contact to miguell at vivaldi dot net so I can start sharing some things with you.

Later.
  1. Helpful
  1. Marco Meoni
  2. Tuesday, 27 October 2020 21:37 PM UTC
Miguel,

your link is a no go, PowerBuilder .NET is dead and buried ;-).

Olaf is looking for a solution with Appeon PB.

Only solution is via MS Interop as from the video I linked earlier in this post.

Best,

.m
  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 27 October 2020 22:00 PM UTC
Marco, I know ... that's why I said "it's old". But ... if one doesn't have a clue where to start, then there's still a lot of information that you can extract from it though, that's why I mentioned it.

With a bit of imagination, what's suggested to do in PB .Net, you try to do it in C#. There might be better information elsewhere.

Anyway. I've been in contact with Olaf and I've provided him a stripped down version of my Crystal Report Viewer ActiveX and also a non visual assembly. Once I've got time enough to make it into a working sample app, with a sample database etc. I'll post it here or on CodeXchange, but for now I'm pretty busy and I don't think there's many people waiting for such a solution.

Like you said "Olaf is looking for a solution with Appeon". The link you provided is useful (I've also used it in its day), but it doesn't give any information on how to integrate the "Crystal Reports", which have changed pretty much from the version he's using.

kind regards
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Sunday, 1 November 2020 18:06 PM UTC
  2. PowerBuilder
  3. # 5

Hi Olaf,

See: https://community.appeon.com/index.php/qna/q-a/how-to-incorporate-crystal-report-viewer

I've tried to explain things step by step.

I any questions, you're welcome to ask here on via my email.

regards.

Comment
  1. IT Crew
  2. Monday, 2 November 2020 09:51 AM UTC
Hi Miguel,

thanks a lot - I'll try and keep you updated.

BR
  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.