Hello,
I am having a problem when creating multiple PDF reports,
I have to print a lot of reports using a composite datawindow,
then i decided use the function save as , using a system produced filename,
when i use this file name the saveas function returns error (-1).
but if i use the user selected the saveas function is working correctly.
Do you know how correct this problem?
Example:
This code below is working:
String ls_edi_pathname, ls_edi_filename
Integer li_rslt
dw_print.Object.DataWindow.Export.PDF.NativePDF.UsePrintSpec = 'Yes'
dw_print.Object.DataWindow.Export.PDF.Method = NativePDF!
dw_print.Object.DataWindow.Export.PDF.NativePDF.PDFStandard = '1' //PDF/A-1a
dw_print.Object.DataWindow.Print.Orientation = '0'
dw_print.Object.DataWindow.Print.Paper.Size = '1'
ls_edi_filename = is_def_filename
li_rsLt = GetFileSaveName("Export as PDF file" , ls_edi_pathname, ls_edi_filename, "PDF" , "PDF Files (*.PDF),*.PDF", "", 8194)
IF li_rsLt = 1 THEN
IF dw_print.SaveAs(ls_edi_pathname, PDF!, False) = -1 THEN
MessageBox("Attention", "Saving as PDF was cancelled")
END IF
END IF
This code below is Not working:
ls_edi_pathname = "C:\reports\EDIdocument.PDF"
dw_print.SaveAs(ls_edi_pathname, PDF!, False) =
Thanks,