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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing to a Text File 1

Status
Not open for further replies.

Philka

IS-IT--Management
Jun 19, 2001
11
0
0
US
Using FPW 2.6. Want to print a report to a text file.
At the end of the Report Form line I added PROMPT. This
brings up the windows printer dialogue setup. I checked
"print to file". It creates the file I named. However,
when I go to edit the file, it it empty.
Why?
Are there other ways to work around printing a report
to a file?
 
1. Use the command..
REPORT FORM myReportForm TO FILE myTextFile
instead of to Print PRINTER Prompt
This will solve your problem.

2. If you have Acrobat Writer software (not just reader), then, ytou can choose that as the default printer and proceed the way you explained.

If you are giving a file name in the printer setup, the printer drivers will b used and so the results cannot be predicted. You can just try your luck with a generic printer installed and add in the file name '.txt'. This cab just be a testing for yourself, but I am nor sure of the result. (1) and (2) above will surely give you result.

Best of luck ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
just curious, if you leave off the prompt directive does the file contain your report?

what type of options are you looking for instead of sending the report to a file? do you want to create a dbf with the lines of the report as records?

also you can export your data to other programs like xcel.

foxpro is a real workhorse when it comes to ways to store information.


 
The combo worked.
I created a printer file Generic/Text only
then
Report Form to file Aoutput.txt

Result: I created a text file that kept most of the
formating created by the Foxpro 2.6 report writer.
Thanks for your expertise and time.
Phil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top