Ok, how does one pass Escape codes from a FoxPro report. I need to send the Escape codes to turn on duplex printing and to print the first side and then print the second side. Sending 2 separate reports for page 1 and page 2 does not work, the printer will always eject a page.
FoxPro 2.6 will not send an esc code for duplexing to a printer because that is a document setting for a specific type of printer. In 2.6 you can only send common Esc Codes to the printers. You may want to look at a 3rd party software "Relational Riter", It may do it.<br>
<br>
To get around the problem, (assuming you are in windows) create 2 printer icons, one for simplex and one for duplex.<br>
1. Add the prompt statement to the report form command.<br>
and / or<br>
2. Just before you issue the report form command in the program, change the windows default printer. In Visual FoxPro it is one command. In 2.6 you will have to run a routine. Microsoft has the routines on their web site for foxpro help. Do not forget to change it back after the report form command.<br>
<br>
If you can not find the routines for changing the default printers on Microsofts site let me know, I have them archived somewhere. I assume you know that writing a program with printer specific command reduces the portability of the program to only computers with the same type of printer. Adding the prompt statement to the report command is the better of the options. The customers will learn what printer to select. If you are writing this for a in-house program where you know what printers or there , then no problem.<br>
<br>
Hope this helps you.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.