×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Send Report Output to a file

Send Report Output to a file

Send Report Output to a file

(OP)
In Foxpro 2.6a (windows) I need to send report output into a file not just print it out. Excel 2.0 is one output option. Is there a way to output the report with formatting to word or excel or even a text file?

Thanks, GordonK

RE: Send Report Output to a file

To export to a word document
report form xxx to c:\mydocuments\word\ file yyy.doc  (it is a post script file but word reads it)

To export to excel
do not use the report form
use the database(s)
set relation(s)
copy to c:\mydocuments\excel\filename.xls fields xxx, xxx ,xxx type XLS (or) XL5 delimited with tabs   

To export to a acsii file,
Use Foxpro 2.6 dos and create the report form
use Foxprow anddo
report form fpd to file c:\mydocuments\ascii\yyy.txt

David W. Grewe
Dave@internationalbid.net

RE: Send Report Output to a file

(OP)
Thanks for the information. Unfortunately, the Word option does not work - "Unrecognized phrase/keyword in comand". Is there a patch or a program that I can download? Is this perhaps a feature ot newer versions?
Thanks for your help.

GordonK

RE: Send Report Output to a file

It might work if I typed it right the first time
report form xxx to c:\mydocuments\word\ file yyy.doc  
should be
report form xxx to file c:\mydocuments\word\yyy.doc

David W. Grewe
Dave@internationalbid.net

RE: Send Report Output to a file

(OP)
OK Thanks, now I can get an output file. Now perhaps you could help me to read it. Word 95 does not recognise it, nor does Wordpad. It looks like this:
 E *t600R &u600D *r0F &l0O &
It does mention this:   language = PCL. Any ideas?

GordonK

RE: Send Report Output to a file

Strange, My copy of 2.6 lets me do it.
Try
use the database(s)
set relation(s)
copy to c:\mydocuments\acsii\filename.txt fields xxx, xxx ,xxx type SDF

I have jury duty next week so if the thead is still active when I get back we can try something else.

David W. Grewe
Dave@internationalbid.net

RE: Send Report Output to a file

This is just a shot in the dark, but I believe when you do a REPORT ... TO FILE it saves it in whatever format the default FoxPro printer is set to - David's is set to a PostScript printer, so it saves as PostScript and is therefore readable by Word - yours saves as PCL (Laserjet default?) so it saves in PCL.

I suppose you *could* set up a bogus PostScript printer... otherwise you could take his other suggestions - copy the database to an Excel or ASCII file (not the report format) using the COPY TO..., or save it as ASCII report using the REPORT FORM... TO FILE ASCII method. Good luck - SKELLY

RE: Send Report Output to a file

I have tried setting up a dummy Post Script printer, and using it as the default printer when trying this process.
I am also unable to read the reports in MS Word.
I need to find a way to get an electronic copy of these reports (with the graphics)... after a little research I found some mention of a program called FOXWORD that converts foxpro reports to ms word rich text format. Unfortunately all the links I Can find for this are dead.
Any suggestions?
Thanks!
John

RE: Send Report Output to a file

I played with FoxWord when the links were still warm (*s*) a couple years back - looked OK but not as good as I wanted at the time... it was quite a while ago. That's probably why the idea kind of died though - reports didn't translate cleanly between output and .RTF formats.

Crystal sounds like it might work for what you're doing though, also. There's also other report writers that have been around with FoxPro forever, although I've never used them - R&R Report Writer I believe, and FoxFire also. But if you can use Crystal that's probably your best bet.

skelly

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close