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. Armeen Mazda @Appeon
  2. Thursday, 31 October 2024 15:44 PM UTC
Yes, David... I think you may be onto something. If it works correctly in the dev environment then it is not a code problem or updating the release header to 22.
  1. Helpful
  1. Dale Burts
  2. Thursday, 31 October 2024 16:38 PM UTC
Updated the release header according to previous instructions, and this has solved the issue.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Thursday, 31 October 2024 17:23 PM UTC
Wow how strange that resolved it. Thanks for sharing the 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.