Microsoft KB Archive/263287

= How to set print options without a REPORT FORM ... PROMPT command =

Article ID: 263287

Article Last Modified on 2/17/2005

-

APPLIES TO


 * Microsoft Visual FoxPro 6.0 Professional Edition
 * Microsoft Visual FoxPro 7.0 Professional Edition
 * Microsoft Visual FoxPro 8.0 Professional Edition
 * Microsoft Visual FoxPro 9.0 Professional Edition

-



This article was previously published under Q263287



SUMMARY
ReportFormPrompt.exe is a sample that contains a Visual FoxPro form that demonstrates how you can control the print options for a printer without the REPORT/LABEL FORM ... TO PRINTER PROMPT command.



MORE INFORMATION
The following file is available for download from the Microsoft Download Center:

ReportFormPrompt.exe

Release Date: May-19-2000

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

How to Use the ReportFormPrompt.exe Sample
NOTE: This code is intended for use with Visual FoxPro 6.0 only.

At times, you may need to control the print options for a printer. The options may include the list of printers to which you print a report/label, the number of copies you need to print, or any other options that are available with the REPORT FORM...PROMPT command.

There is a Visual FoxPro form in the ReportFormPrompt.exe sample that demonstrates how you can control these print options by using the Windows Spooler API and Windows API.

The sample form also demonstrates how you can hide printers from the user so that unsupported printers do not display.

Copy the ReportFormPrompt.exe sample to a folder and run the .exe file.

The ReportFormPrompt.exe file contains the following files:

Syntax: DO FORM ReportFormPrompt [WITH [cReportName] [, cForWhile] [, cScope]] PARAMETERS:

RETURNS:

Nothing

EXAMPLE: DO FORM ReportFormPrompt WITH &quot;MyReport.frx&quot;, &quot;FOR CustID = 3 WHILE OrderID = 2&quot;, &quot;Next 100&quot;

