1. Dale Burts
  2. PowerBuilder
  3. Tuesday, 29 October 2024 19:48 PM UTC

I saw the recent post importdatawindow-returning-1-for-sp-datasource, and have been having a similar issue.

 

PDFdocument lpdf_doc
lpdf_doc = create PDFdocument
.....
.......


dw_1.settransobject( sqlca )
dw_1.retrieve( report_number )
dw_1.object.DataWindow.Export.PDF.Method = NativePDF! 
dw_1.Object.DataWindow.Export.PDF.NativePDF.PDFStandard ='1'
dw_1.Object.DataWindow.Export.PDF.NativePDF.CustomSize = '5'

ll_return = lpdf_doc.importdatawindow( dw_1 )

[THIS IS THE CALL THAT THROWS THE ERROR]

We have had a user experiencing this issue for some time now.

The previous code used a simple dw_1.SaveAs ( ls_network_path, PDF!, TRUE) with no issues.

Prior to switching over to using PDFDocument, I had published a question regarding if GhostScript was still required if we were switching over to using PDFDocment.  I believe the response was that one didn't necessarily have anything to do with the other.

 

So we have moved forward with the 2022R3 migration, using the PDFDocument to build the PDF and save to a network location.

However, we are not using a stored procedure as datasource, but we are building a composite report (comprised of 15 separate datawindows)

However, most of the headers say "release 12.5;"  and a couple say "release 19;"

Another thing that is peculiar in diagnosing this bug, from my development machine, while running the executable, I have no issues completing the process which calls IMPORTDATAWINDOW (which is triggering the error message above for one of our users), followed by calling SAVE using PDFDocument.  Not sure if other users are also experiencing the same issue, but clearly it is has been an issue for this one user.

 

Last thing, the error is fired the first time through the code, the next time the user runs it saves without issue.

 

 

 

Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 30 October 2024 14:09 PM UTC
  2. PowerBuilder
  3. # 1

So you mean it works fine on your dev machine but fails on the user's machine?  Is it failing for all users or intermittent?

Comment
  1. Dale Burts
  2. Wednesday, 30 October 2024 14:56 PM UTC
Correct, works fine on my dev machine... and we just stood up a test box, and works fine there as well.



I am wondering if one suggestion to update the release header to 22 from what is listed for previous versions (release 12.5; release 19;) to see if that would work (in case the user has a dated machine - or does not have all the current updates).



Odd thing is, it works for this user the second passthrough.



And no other users have reported this.



  1. Helpful
  1. Armeen Mazda @Appeon
  2. Wednesday, 30 October 2024 15:02 PM UTC
So its not consistently happening even for that one user?
  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.