Partager via


How to: Save the Printer Environment for Reports

You can save the current printer environment settings with a report. The printer settings are saved to the appropriate memo fields in the report header record. Your selection is saved between Visual FoxPro sessions.

Note

In Visual FoxPro 9, unlike earlier versions, the printer environment is not saved with reports by default, even for reports created in a distributed application. Saving the printer environment with reports make opening a report for design sessions much slower, especially if the printer may be on another machine on a large network, and this setting is less important than it was to earlier versions of the Visual FoxPro Report System.

Note

Sometimes you design a report always to be printed in a single environment, requiring settings specific to a single printer. In this case, you can opt to save the Printer Environment with your report. Even in such a case, however, it is often better practice to omit the printer environment settings from the report or label definition file (frx or lbx).

For run-time processing, the printer settings can be specified for report or label processing using a SET PRINTER TO NAME command before the REPORT FORM or LABEL command. This approach keeps the printer environment settings external to the report or label definition file, while allowing you to specify them exactly as needed for the individual report. For more information, see SET PRINTER Command.

To save the printer environment settings

  1. Open the report or label in the appropriate designer.

  2. On the Report menu, click Printer Environment if it is not selected.

You can also choose this setting from the Tools menu by clicking Options, then the Reports tab in the Options dialog box, or from the Report menu by clicking Properties, then the Page Setup tab in the Report Properties dialog box. For more information, see Options Dialog Box (Visual FoxPro) and Report Properties Dialog Box (Report Builder).

You can use the SYS(1037) function to initialize printer environment settings for the default printer or your report printer environment settings. For more information, see SYS(1037) - Page Setup Dialog Box.

See Also

Tasks

How to: Open Reports and Labels

Other Resources

Running Reports