Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with Reports Data

Status
Not open for further replies.

ChrisAgius

Programmer
Sep 27, 2000
51
MT
I am Trying to Export A Report to an Ascii File then Back to the Normal state ....

Print Report XXX To File XXX Ascii

How Can I Preview the Ascii file as a Report Format
 
I think what you are asking is how can you view the exported ASCII report from within your VFP app. If that is correct, you must remeber the newly created file is no longer a FoxPro formatted report. But is a simple ASCII text file. You can still view the file however.

Here are few suggestion to view the file:
1. Use the "RUN" command to load NotePad.exe and pass the the text file as a parameter:
run c:\windows\notepad.exe c:\myreport.txt

2. Convert the text file to a string using the FILETOSTR() function and then display the text in the main FoxPro window as in:
? FILETOSTR('c:\myreport.txt')

If this isn't really what you were asking please re-post your question and I'm sure you'll get the result your looking for (you know, like the Democrats in Florida).

Joe
 
Thanks for the Answer. . . . It was useful.

How can i export a report with all the format to file and then get a preview of that file

THanks a lot
 
Chris,
The first recommended way to do this is to buy a copy of Acrobat Writer ( for each user that needs this capability. Then visit Rick Strahl's site and download his free "wwPDF Class - printing VFP reports to Adobe Acrobat" - the article is worth reading even if you don't use his code. (Don't worry about the "Web" references, it works just as well in a non-web application.)

There are at least two alternatives that I've "heard" discussed - one is the AMYUNI PDF Converter - a substitude for the Adobe software ( and another is using a "standard" PostScript printer driver and use GhostScript/GhostView to produce a PDF file. You select a PS capable printer driver, print to a file, and then use GhostScript to convert the PS file into a PDF. You can get it free at . (Note: I haven't tried either of these solutions, although I hope to try out the PS/GS/GV option soon.)

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top