Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invalid Path or File Name when running report
Message
From
14/08/2007 20:08:51
Stan Vaninger
Mitek Industries, Inc
Missouri, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Invalid Path or File Name when running report
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01248172
Message ID:
01248172
Views:
239
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
Next
Reply
Map
View

Click here to load this message in the networking platform