Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report does not print properly
Message
 
 
To
03/11/2001 19:59:47
Thomas Ianuzzi
Information Security Consultants, Inc.
Florida, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00576486
Message ID:
00577176
Views:
28
For some reason Acrobat 5 creates actual PDF file in the current directory. For example, if lcPfile = "C:\somedir\mypdf.pdf" and current VFP directory is "C:\temp" the two files'll be cretaed. The first "C:\somedir\mypdf.pdf" with 0 size and actual pdf file "C:\temp\mypdf.pdf". Here's how you can fix it
lcPfile = "C:\somedir\mypdf.pdf" 
lcTempfile = (FORCEEXT(lcPfile, "tmp"))
REPORT FORM myreport TO FILE (lcTemlcPfile) NOCONSOLE
RENAME (JUSTFNAME(lcPfile ) ) TO (lcPfile )
ERASE (lcTempfile)
If you don't want file to be created in the current directory than
lcPfile = "C:\somedir\mypdf.pdf" 
lcSaveDir = FULLPATH("")
SET DEFAULT TO ( JUSTPATH(cPfile))
lcTempfile = (FORCEEXT(lcPfile, "tmp"))
REPORT FORM myreport TO FILE (lcTemlcPfile) NOCONSOLE
ERASE (lcTempfile)
SET DEFAULT TO (lcSaveDir )
>
>I tried the NOCONSOLE and it effectively blocked the output to the screen but, the file length is still 0. I am using Acrobat 5.00 3/22/2001.
>
>Thanks for the information. If you have any other thought I would welcome them
>
>Tom
>
>>Add NOCONSOLE to suppress printing to the screen. What version of Acrobat are you using?
>>
>>>I have the following code in a FoxPro 7 Program running under XP. This should produce a file in the fully qualified filename PFNAME. Instead it opens a file in the proper place with the proper name, makes it zero bytes in length and then previews the report to the screen.
>>>
>>>SET PRINTER TO NAME 'Acrobat PDFWriter'
>>>REPORT FORM &REPORTNAME TO FILE (PFILE) NOCONSOLE
>>>
>>>Does anyone know what is happening, or what I am missing
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform