>Hi.... I am trying to export the report to excel or word by this command: >report form report_name to file file_name.doc ascii. However it does not appear in a proper way such as preview in VFP. How can I print report to excel or word document?
Kusnardi,
When you send a report to an ASCII file you lose all formatting. That's why the code Hilmar referenced was written.
Another alternative is to get a PDF printer driver and choose that "printer" from the regular VFP/Windows print dialog. You'll get a PDF file which will duplicate a hardcopy report generated from your report form.