1. Roland Mühlberger
  2. PowerBuilder
  3. Wednesday, 21 December 2022 11:51 AM UTC

Hello dear PowerBuilder developers,

for some reason I tried to use the .psr-format in PowerBuilder to save datawindow definition plus data.

In the PowerBuilder IDE there is the menu item "File / Save As File..." to do that.

So that's what I did - saved my dataobject into a psr file. The dataobject contained some rows at that time.

Strange thing is: When I assign this psr file to a DataWindow control I do get my dataobject, but all the data is missing.

Any ideas?

Regards,

Roland

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 21 December 2022 13:41 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Roland;

  In order to get the DWO + data in the DW Painter, you need to perform the SaveAs from the painter's "Preview" pane after a successful Retrieve is completed.

Regards ... Chris 

Comment
  1. Roland Mühlberger
  2. Wednesday, 21 December 2022 15:53 PM UTC
Hi Chris, right on!



I used "File / Save As File..." from the main menu which brings a different version than "Save Rows As..." from the context menu in the preview view.

And voila: The one created by "Save Rows As..." is the same as created from within a PowerBuilder application.

Why the version created by the PB main menu brings a different result is strange, but not a problem anymore. Thanks for your help.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 21 December 2022 18:06 PM UTC
Hi Roland;

That is great news ... Ho, Ho, Ho! It's always a good day IMHO when you learn something new IMHO! ;-)

I never knew that about the main menu as I have only used the SaveAs from the Preview pane since the Preview feature was introduced in the PB IDE's DW painter. LOL!

Regards ... Chris
  1. Helpful
There are no comments made yet.
Roland Mühlberger Accepted Answer Pending Moderation
  1. Wednesday, 21 December 2022 13:58 PM UTC
  2. PowerBuilder
  3. # 1

Ok, here's the thing: dataobjects saved as .psr from within an application via dw.SaveAs('xyz.psr', psReport!, TRUE) do work when assigning the .psr file to the dataobject via dw.dataobject = 'c:\path\to\xyz.psr' and also keep their data.

Dataobjects saved from within the IDE are of different size. When assigning this version, one gets the datawindow without the data.

That leaves some questions:

  • Does anybody use the function from within the PowerBuilder IDE at all?
  • Why does it create something different to the version from a PowerBuilder application via SaveAs?

I will post that as a bug/enhancement request. 

Regards and thanks,

Roland

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 21 December 2022 15:17 PM UTC
Hi Roland;

This is not a bug for me that I can recreate (although, it would be nice to know what version & build that you are using)! I suspect though (my best guess) is that the PB Version & build on your IDE vs the PB App's PB runtime version & build are different. If that is the case, then I have seen this type of PSR issue happen before.

Regards ... Chris
  1. Helpful
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Wednesday, 21 December 2022 12:33 PM UTC
  2. PowerBuilder
  3. # 2

Hi.

If you edit your psr with a text editor (like notepad++) do you see any special characters at the end?

Andreas.

Comment
  1. Roland Mühlberger
  2. Wednesday, 21 December 2022 13:38 PM UTC
It starts somehow like this:

‚ Platform independent PSR File Format, Copyright Sybase, Inc. 1997  report.psr    FSInfo „

and at the end I can see somethiing like this:

olestg  dwstg   dwlookup   neststg



In between I even see parts of the saved data, also the size of the psr file implicates that the data is saved properly. But when I assign it within the PowerBuilder application, the data is gone.
  1. Helpful
  1. Roland Smith
  2. Wednesday, 21 December 2022 13:52 PM UTC
  1. Helpful
  1. Roland Mühlberger
  2. Wednesday, 21 December 2022 15:46 PM UTC
Roland: Same result. It seems, that the version created from within the IDE is different to the version created from a PB application...

  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.