1. An Nguyen
  2. PowerBuilder
  3. Wednesday, 16 February 2022 09:59 AM UTC

Hello,

We have a web app that has a function to print the report designed by PowerBuilder.
When using PB12.6, we created a .NET assembly project in PB. It receives the arguments from the web app, retrieves data for the requested report, and then save the report in PDF file format. In the web app, we print the report by calling the assembly and then open the PDF file returned by the assembly. It works great.

It works also when we upgrade to PB2017 and PB2019. In the new version of PB, we just deploy the assembly project and then copy the necessary files (*.DLL, *.PBD) to the web app. Of course, we must install the PB .NET runtime component also.

Now we upgrade the PB to PB2021 (build 1506) and do the same treatment but it cannot work. The assembly returns an error when retrieving data. I try to replace the PBD file with the old one (generated by PB2019) and it works again. It does not work with the new PBD file.

Any advice? How can it work with the new version of PB2021?

Thanks,

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 16 February 2022 15:15 PM UTC
  2. PowerBuilder
  3. # 1

Which error does it return?

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 16 February 2022 15:46 PM UTC
  2. PowerBuilder
  3. # 2

Hi An;

  The PB 2019 R3 and PB2021 releases introduced a completely new way to interact with a .NET Assembly using the new DotNetAssembly and DotNetObject object classes. Did you convert your older PB App's code to use this new technique?

FYI: https://docs.appeon.com/pb2019r2/whats_new/ch01s03.html

Regards ... Chris

Comment
There are no comments made yet.
An Nguyen Accepted Answer Pending Moderation
  1. Thursday, 17 February 2022 02:31 AM UTC
  2. PowerBuilder
  3. # 3

Which error does it return?

Function retrieve() return -1

Comment
There are no comments made yet.
An Nguyen Accepted Answer Pending Moderation
  1. Thursday, 17 February 2022 02:47 AM UTC
  2. PowerBuilder
  3. # 4

Hi An;

  The PB 2019 R3 and PB2021 releases introduced a completely new way to interact with a .NET Assembly using the new DotNetAssembly and DotNetObject object classes. Did you convert your older PB App's code to use this new technique?

FYI: https://docs.appeon.com/pb2019r2/whats_new/ch01s03.html

Regards ... Chris

Thanks, Chris. We do not use .NET assembly in PB, so we did not convert our code to use this new technique.

Instead, we create a .NET assembly in PB (initial in PB12.6) and use it in the web app. In the web app, we call the assembly created by PB to print the report. It works fine with PB 2019 R3. But if we use the PBD file generated by PB2021, the function Retrieve() returns -1.

Comment
  1. An Nguyen
  2. Thursday, 17 February 2022 05:05 AM UTC
Do you mean a DataStore becomes .NET DataStore when calling it from a web app and we cannot save it as PDF file? But it even cannot retrieve data. I test this assembly in PB and it works OK. But it cannot work in the web.

You said I must rewrite this but could you suggest me which object or approach should I use to resolve the problem?

Thanks
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Thursday, 17 February 2022 05:33 AM UTC
Yes, .NET DataStore is .NET version of DataStore that you could call from Web app. Yes, .NET DataStore is non-visual so it doesn’t generate PDF reports. Here is more info about .NET DataStore: https://www.appeon.com/products/dotnet-datastore

There are so many ways to rewrite what you are trying to do, and must carefully consider many factors to make proper suggestion. You might want to contact one of our consulting partners for help with rewriting it: https://www.appeon.com/consultants/consulting-partners
  1. Helpful
  1. An Nguyen
  2. Thursday, 17 February 2022 09:46 AM UTC
Thanks. We try to find another solution.
  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.