Information générale
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Invalid Path or File Name when running report
Versions des environnements
I am getting an interminttent error when I run a report and save it to a file. Most of the time the code executes OK but sometimes generates the error, '202 Invalid path or file name' on the line, "Report form (lcReportName) To File (lcPS) Noconsole Next 1"
Here is the whole form method:
Lparameters lcReportName, lcPDFFileName, llNext1
Local lcPDF, lcPS
lcPDF = Addbs(Justpath(lcPDFFileName)) + Juststem(lcPDFFileName) + ".pdf"
lcPS = Addbs(Justpath(lcPDFFileName)) + Juststem(lcPDFFileName) + ".ps"
Set Printer To Name 'Adobe PDF'
If llNext1
Report Form (lcReportName) To File (lcPS) Noconsole Next 1
Else
Report Form (lcReportName) To File (lcPS) Noconsole
Endif
Set Printer To Default
If File(lcPS)
loDist = Createobject("pdfDistiller.PDFDistiller.1")
lnResult = loDist.FileToPDF(lcPS,lcPDF,"")
Endif
I am using Adobe Acrobat 8. I have put in a wait window to check the path/filename string and it is always correct. Are there any gotcha's with this type of command? Any suggestions on other ways to do the same thing?
Thanks very much,
Stan
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement