HOWTO: Print a Report to a File in FoxPro for Windows

Last reviewed: August 19, 1997
Article ID: Q121631
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5x, 2.6x

SUMMARY

The REPORT FORM <file> 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 <file> TO <anyfile> command, where <file> is the name of the .FRX file and <anyfile> 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 <file> 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.

REFERENCES

"Language Reference," page L3-725


Additional query words: 2.50 2.50a 2.50b 2.60 2.60a
Keywords : FoxWin FxprintFont kbprint
Version : WINDOWS:2.50,2.50a,2.50b,2.60,2.60a
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: August 19, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.