Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Invalid Path or File Name when running report
Message
De
14/08/2007 20:08:51
Stan Vaninger
Mitek Industries, Inc
Missouri, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Invalid Path or File Name when running report
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01248172
Message ID:
01248172
Vues:
241
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
Fil
Voir

Click here to load this message in the networking platform