Microsoft KB Archive/121631

{|
 * width="100%"|

-

The information in this article applies to:


 * Microsoft FoxPro for Windows, versions 2.5x, 2.6x

-

SUMMARY
The REPORT FORM TO FILE command cannot send a graphics-based report created in FoxPro for Windows to a text file. To print a report to a file in FoxPro for Windows, you must use the Windows printer setup application in the Control Panel.

NOTE: In Visual FoxPro, use the REPORT command's new ASCII clause to accomplish this.

MORE INFORMATION
To print a report to an ASCII text file, install the Windows Generic/Text Only printer driver, as follows:


 * 1) Run the Windows Control Panel.
 * 2) Double-click the Printers icon.
 * 3) Click the Add button.
 * 4) Under List of Printers, select the Generic/Text Only printer driver and click the Install button. This places the Generic/Text Only printer driver under the list of Installed Printers.
 * 5) Under Installed Printers, select the Generic/Text Only printer driver, click the Connect button, select FILE in the Ports list box, and then click the OK button.
 * 6) Select the Generic/Text Only printer driver, click the Set As Default Printer button, and then click the Close button.

Before printing your report, turn off any bold or italic fonts. Issue the REPORT FORM TO command, where is the name of the .FRX file and is the name of your output text file.

Alternatively, you can do the following:


 * 1) Install the Windows Generic/Text Only printer driver and set it as the default printer using the procedure given above. Do not click the Close button.
 * 2) Select the Generic/Text Only printer driver, click the Connect button, select FILE: in the Ports list box, and then click the OK button.
 * 3) Click the Close button.

When you issue the REPORT FORM TO PRINT command, a dialog box will appear prompting you for an output filename.

Once the file is created, you can view it using any ASCII text editor.