1. You can use the same report command and create a text file which you can attach with email and send.
For example...
REPORT FORM myReport ..... TO FILE (myTxtFile) ASCII
(Assuming you only have a text based output and no picture or graphs are involved)
If you have such pictures or graphs then you have to use a PDF writer (Acrobat distiller etc..) ---> if that is set as default printer -----> when you print your report to printer.. you will be asked to choose a file name and then you can save that as .pdf file. This file can be attached with mail and sent.
2. To view the PDF or a txt file, no VFP is required.
3. You look in the FAQ section for a contribution by me as to how you can send an email from VFP (in case you want to send this text file to outlook outbox.
How can I send an Email using OUTLOOK from VFP?
faq184-766
4. In the following code
**********************************************************
o=createobject("outlook.application"
oitem=o.createitem(0)
oitem.subject="Email From VFP6"
oitem.to="ramani_g@yahoo.com"
oitem.body="This mail was sent from vfp using Outlook98"
oitem.Attachments.Add("MyFullPath+MyFile+Ext"
oitem.send
o=.null.
**********************************************************
Assuming myTextFile is the text file, you can put the code..
oItem.body = FILETOSTR(myTextFile)
can make the report as the body of the text also instead of attaching the file.
Best of luck
Hi
It is likely the default paper width is less than what the paper can hold if it were a report. To test this, try setting the paper to landscape mode. Otherwise, i cannot think of any error with infornation you have made in this thread. ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
Hi, thank you for reply me again.
I found that, font size of my report is 10 and the font size of text file is 12. And also the left and right margin of text file is larger than that of foxpro report. It cause the format change in the text file. Can I change the font size or margin of text file when I export the report to text file?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.