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

Send to text file 1

Status
Not open for further replies.

hydrant

Programmer
Sep 12, 2002
3
US
I have a report I created through the repot wizard. I would like to have the report print out to go to a text file instead of the printer. I am using foxpro 2.0 programing in visual foxpro 5.0. I have tried a number of different options none seem to work. Please help.
 
HI
Have you tried..

REPORT FORM myReportForm TO FILE myTexFile ASCII

If you still have problem, post the code you are using, so that me or some one will help you out. :)


ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com

 
Hi

The solution provided by Ramani should work effectively. But if you are using foxpro2.0 programming and have the report also written in that you could run the same report and give

set device to file xyz.txt

before starting the report and

set device to screen

after the report. All formated data with @ say command will go in the txt file in the default directory. If you are using ? in your report for output, you can replace it with @ r,c say commands. It works the same way. I hope it helps.

Munish
 
Hi Munish

That is a good point..

If the code is from FoxPro 2.0.. the same can be achieved, by the code..

SET ALTERNATE TO myFileName.txt
...
...
@ SAY print commands...
..
..
SET ALTERNATE TO

ALl the displays to screen is directed to myFileName.txt
:)

ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top