Microsoft KB Archive/113805

{| = PRB: ??? Command Issued Before Running Report Is Ignored =
 * width="100%"|

ID: Q113805

2.50 2.50a 2.50b 2.60 | 2.50 2.50a 2.50b 2.60

WINDOWS              | MS-DOS kbprg kbprb The information in this article applies to:


 * Microsoft FoxPro for Windows, versions 2.5, 2.5a, 2.5b, and 2.6
 * Microsoft FoxPro for MS-DOS, versions 2.5, 2.5a, 2.5b, and 2.6

SYMPTOMS
Printer control codes sent directly to the printer prior to running a report created with the Report Writer are overwritten if a printer driver is in effect.

CAUSE
Although the triple question mark command (???) can be used to issue commands directly to a printer when you are hard-coding a report, the printer settings will have no effect when they are used in conjunction with a FoxPro report created with the Report Writer, which uses a printer driver. FoxPro for MS-DOS printer drivers and the Windows printer drivers issue their own commands to reset the printer before printing a report created with the Report Writer.

RESOLUTION
To work around this behavior, do one of the following:

  Specify that no printer driver be used for the report: - For FoxPro for MS-DOS, issue the following command before running the report: SET PDSETUP TO ""

- For FoxPro for Windows, select the Generic/Text Only driver, and make sure that PDSETUP does not appear in the REPORT FORM command.

-or-   Modify the P_CODES database, adding a new record containing the codes you want to have issued before the report is run. For information about how to modify the P_CODES database, please see the following article(s) in the Microsoft Knowledge Base: ARTICLE-ID: Q89000 TITLE : How to Edit the FoxPro P_CODES Database -or-  Create a user procedure for PDDOCSTART.

Additional reference words: FoxDos FoxWin 2.60 escape xbase RWriter KBCategory: kbprg kbprb KBSubcategory: FxtoolRwriter Keywords         : FxtoolRwriter Version          : 2.50 2.50a 2.50b 2.60 | 2.50 2.5 Platform         : MS-DOS WINDOWS
 * }