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

how can i send a report to others

Status
Not open for further replies.

ChrisLaw

Programmer
Dec 14, 2001
6
HK
I only know how to print a report.
1) Can i send such report to others by email?
2) Is it possible if he do not have vfp?
 
HI

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 :)

ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
I have try the first method, thank you very much! But the text file miss some item of report.for example

1)
in report: (HK$)
in the text file:(HK$

it will miss")"

2)
items on the right of the report will missing too.

How can I solve it?
Thank you.
 
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?

Thank you very much

chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top