Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending a report to a PDF
Message
 
To
25/07/2007 09:02:11
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01243454
Message ID:
01243607
Views:
23
There's a change in behavior for 90. This is from the help file:

"When you omit the ASCII keyword or use Visual FoxPro's object-assisted output mode writes PostScript or other printer codes to the text file along with the content of your report. To create an ASCII text file from the report definition file, SET REPORTBEHAVIOR 80 and include the ASCII keyword."




>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  &&Works, show data in PDF.
>SET ReportBehavior 90 &&Shows garbage in PDF.
>
>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
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Previous
Reply
Map
View

Click here to load this message in the networking platform