How to use the default Windows printer in Visual FoxPro (138396)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 3.0
  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 6.0
  • Microsoft Visual FoxPro for Windows 7.0
  • Microsoft Visual FoxPro 8.0
  • Microsoft Visual FoxPro 9.0 Professional Edition

This article was previously published under Q138396

SUMMARY

The Report Writer in Visual FoxPro saves specific printer settings in the .frx file. Sometimes, a user may want the report to always print to the default Windows printer.

MORE INFORMATION

The following steps will remove specific printer settings from the report file:

  1. Open the report as a table:
       USE MYREPORT.FRX
    						
  2. Locate the record that holds the printer information:
       LOCATE FOR Objtype = 1 AND Objcode = 53
    						
  3. Remove the printer settings:
       REPLACE Tag  WITH ""
       REPLACE Tag2 WITH ""
       REPLACE Expr WITH ""
    						
  4. Close the report table:
       USE
    						
At this point, the printer settings have been removed, and REPORT FORM will always print to the default Windows printer.

REFERENCES

For more information about controlling the printer for a report, please see the following article in the Microsoft Knowledge Base:

133163 How To Control Printer Attributes for a Report at Run Time


Modification Type:MajorLast Reviewed:2/11/2005
Keywords:kbhowto kbprint kbReportWriter KB138396