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

Email report

Status
Not open for further replies.

bon011

Programmer
Jun 2, 2002
155
CZ
Hi all,

I have this problem. I wont to print a report in my application. But I wont to send this report with email to another user and he should print it. This user dont have installed foxpro application.


For example: User who is working with application have to send report to another user. He should print it.

How can I convert report to some format that can print anyone?
 
Why not use HTML or PDF as an exchange format for your reports. Look at FRX2HTML. DO a search in this forum for "PDF". Should give you a start in the good direction.

Jean
 
Hi Bon11,

In addition to Jean's advice, you can simply "print" the report to a PDF printer driver. This will create a PDF file, which you can send to the user. The user will be able to view and print the report using Acrobat Viewer, which is freely available.

There are many PDF drivers available. Either do a web search, or check out Usually, you have to pay, but they are not expensive.

Once you have set up the driver, just set the printer in VFP to the driver name (SET PRINTER TO NAME) and run the report as usual.

Mike
Mike Lewis
Edinburgh, Scotland
 
You could always create your own file with FCREATE() FWRITE() etc and insert HTML tags as you generate your report line by line. You can then customise the email example in VFP to add the HTML report file as an attachment or (if you can load it into a string) as the body of the email message.

You could also use the VFP GENHTML function but you do not have very much control of the layout if you actually manage to get it working for a complex report.

Laurie Kennedy

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top