Hi,
I am trying use PDFDocument object to import datawindow to print. It seems that if the datawindow datasource is a Stored Procedure then ImportDatawindow is returning -1.
PDFDocument lpdf_doc
Long ll_return
dw_1.SetTransObject(SQLCA)
dw_1.Retrieve()
lpdf_doc = CREATE PDFDocument
ll_return = lpdf_doc.ImportDatawindow(dw_1)
ll_return is -1, because datasource is SP for dw_1. In case of datasource being a normal select(Quick Select/SQL Select) then ImportDatawindow is returning 1.
Has anybody come across this issue?
The problem is caused because the DWO's source is *not* migrated to PB 2022 Rx from PB 2019 R3 and thus that old syntax is not processed properly when performing the ImportDatawindow() command.
The fix would be to edit the PB 2019Rx DWO's source in PB 2022 R3 and change the 1st lin3 from "release=19;" to "release=22;" & then save the DWO source back to its PBL to have the DWO properly migrated to the 2022 R3 standard . Then the ImportDatawindow() command should now work OK.
Regards .. Chris
Actually, what I say is that I don't have a problem even when using a datawindow created with older PB release (in this case 2019 R3). It also works with a datawindow created from PB 2022 R3 using a stored procedure as datasource.
Andreas.