1. Jeff Gibson
  2. PowerServer
  3. Tuesday, 21 November 2023 21:59 PM UTC

Got an interesting issue I'm running into within the PowerServer environment. PB 2022 R2.

The application in question does the following.

PB way of handling things. A PBL is created locally on the end-users' machine at runtime.

This allows reports to be loaded dynamically from a reports table and imported into this dynamically created PBL.

If I run the app natively through PowerBuilder, it runs just fine. Reports load dynamically with no issues.

Now let's take it over to PowerServer. 

When we attempt to run this module under PowerServer, when it attempts to import the dw syntax, we get the following error.

DataWindow syntax has incorrect release number.

Incorrect Release Number


We started looking through the reports table and noticed that the release number for the reports was all over the place. 12, 17, 19, etc.

So, we created a new report out of PB 2022 R2 and saved that syntax into the reports table.

Got the exact same error. 

Is there is issue with importing datawindow syntax dynamically under the PowerServer environment?  I know the PBL's no longer exist under the PowerServer environment but was under the impression that another folder would be created to mimic that PBL locally that was created.

Thanks for any help!

Attachments (1)
Accepted Answer
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 22 November 2023 00:26 AM UTC
  2. PowerServer
  3. # Permalink

Instead of your current approach, how about just dynamically create DW from Syntax in PowerScript?  PowerServer does support dynamically creating DataWindows.  Just be aware of this limitation: https://docs.appeon.com/ps2022r3/Dynamic_DataWindow.html

Comment
  1. mike S
  2. Wednesday, 22 November 2023 01:50 AM UTC
jeff,

As Armeen says, just import the syntax from a report table.



the 'other' limitation is that you MUST use SQL syntax (not graphical) if you are importing the datawindow object.



in any case, i do this all the time in my PS application. if you want to chat about it email me and we can setup a goto-meeting tomorrow.



  1. Helpful 2
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 21 November 2023 22:15 PM UTC
  2. PowerServer
  3. # 1

Hi Jeff;

  One possibility: You cannot randomly just import DWO syntax that the PS Project has never seen before as there is no generated corresponding Web API  for that DWO not to mention a corresponding DW.NET object. Could be the case here?

Regards .. Chris

Comment
  1. Jay Hastings
  2. Wednesday, 22 November 2023 22:03 PM UTC
Jeff's and my issue is this: I have a composite report. The nested report syntax needs to be modified dynamically based on the product. The nested report contains a JPG and that filename needs to be changed to that products JPG. What I've been doing is....

1. Get the syntax of the base report

2. Loop through the syntax looking for nested report name

3. Depending on the name, it REPLACES “FULL.JPG” with the actual product number (ie 8512345.JPG)

4. Creates the DW in a temporary PBL with A NEW NAME using the product number

5. After that, I change the names of the nested reports in the base report to use the names from #4

6. Create the report using Create()

7. Retrieve



Any recommendations would be great.

  1. Helpful
  1. Ronnie Po
  2. Wednesday, 22 November 2023 22:21 PM UTC
Hi Jeff and Jay,



Unfortunately, as far as I know, there's no way to create the nested report dynamically and pass the reference to the higher level report. I'm pretty sure that Mike S has run into this situation and can chime in with more detail (and maybe a workaround).
  1. Helpful
  1. mike S
  2. Wednesday, 22 November 2023 22:41 PM UTC
"nested report dynamically "

using GetChild and then creating that report dynamically was a feature in PS 2020 and prior versions, but never added to PB and thus not in PS 2022+

obviously, this is doable since appeon had it over 10 years ago. just need enough people to ask for it to be added to PB and thus PS.







Mark Bemis did a presentation in 2012 techwave on this very subject:

"Techniques for Storing User Created DataWindows and Graphics in the Database "

That presentation addresses ALL of these types of issues. It's a master class on this subject.

















  1. Helpful 2
There are no comments made yet.
Ronnie Po Accepted Answer Pending Moderation
  1. Thursday, 23 November 2023 00:42 AM UTC
  2. PowerServer
  3. # 2

Just a thought exercise, but in theory the client app can consume a web service that kicks off a client-server "helper" app running on the server to build the dynamic reports. The helper app would then do a GetFullState() and return the blob to the client. Don't know if this would work in practice, but might be worth a try.

Comment
  1. mike S
  2. Thursday, 23 November 2023 16:11 PM UTC
I don't think full state would work for that, PSR would probably be better. However, typically the user wants to print the report, so maybe just returning it as PDF would work. We provided that as an option (also excel, CSV, PSR) for the old powerserver since it couldn't handle 90+ pages in a report well.



We use the topwiz web to generate reports that gets called by webapi but runs in regular powerbuilder:

https://topwizprogramming.com/topwizweb.html













  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 23 November 2023 19:32 PM UTC
Hi Mike;

Note that PSRs won't work for Nested or Composite DWs as they don't often contain the result sets for all the child DWOs.

I think that TopWiz Web would be one very good option to have the reports generated in the middle tier. Then transfer the completed report to the client as a PDF.

Also, calling a SP or posting a report request to a DB table then either way, calling a PB batch App EXE from the DBMS work work too on the DBMS server. Then have the final report saved as a Blob in the Report Table or push the PDF to a Web Server upon completion. Then the Client App could pull the PDF report using a SelectBlob or HyperlinkToURL command.

Food for thought. HTH

Regards ... Chris
  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.