Jerry,
You have a bit strange code below. You're erasing the file before renaming and other work. Not to mention a typo at
SET PRINTER TO NAME "Acrobat PDFWriter") && Extra ) at the end
Did you try any other means of producing PDFs?
>Using VFP9 SP1. I have a simple VFP report that uses 1 table and displays it's data. I am trying to send this report to a PDF file. I have Acrobat 5.0 PDF Writer. Below is my code sample.
>
>I can send my report to a PDF file fine if I have SET ReportBehavior 80. But if I SET ReportBehavior 90, the output sent to the report is garbage, meaning that the data is unreadable.
>
>Why does the report output garbage to the PDF with SET ReportBehavior 90, but it works fine with SET ReportBehavior 80? How can I make my report output correctly to a PDF with SET ReportBehavior 90?
>
>
>
>lcReport = [frx\r_test.frx]
>
>*SET ReportBehavior 80
>SET ReportBehavior 90
>
>SET PRINTER TO NAME "Acrobat PDFWriter")
>
>lcTFile = SYS(2023) + "\" + SYS(2015) + ".ps"
>
>REPORT FORM (lcReport) NOCONSOLE TO FILE &lcTFile
>SET PRINTER TO
>
>ERASE (lcTFile)
>lcTFile = FORCEEXT(lcTFile,"pdf")
>lcOutputFile = [c:\apps\junk\my.pdf]
>
>ERASE (lcOutputFile)
>lcTFile = FULLPATH(JUSTFNAME(lcTFile))
>RENAME (lcTFile) TO (lcOutputFile)
>
>
>
>Thanks,
>
>Jerry
If it's not broken, fix it until it is.
My Blog