>Gentleman,
>
>I´m having a problem with a remote user that use the Terminal Server to connect to my server (windows 2000 server portuguese brazil) and use the sistem ( VFP7 ).
>
>Until last friday, the server had the Service Pack 2 installed and everything worked normally
>
>Last saturday I´ve installed the Service Pack 3 and now I have the following problem: when the user has to print a forma bill of sale (the printer is an Epson FX 2180 using the driver Generic / Text Only. The Driver is in the Windows 98 and also in the Terminal Server) the printer eject the first page. I don´t have any command "eject" in the sistem, the document is sent directly trough the "???".
>
>What can be wrong????
This is just a SWAG, but it's normally the case that the first ??? issued by VFP causes a context shift for the print device, which results in a skip to top of page. If this is the case, you can bypass the Windows GDI layer that connects your app to the spooler by using a few API calls. Download File #
9957 and use it to print directly to the Epson bypassing the GDI; instead of ???, use the DocWrite method to print the report as a direct replacment:
* Existing code
SET PRINTER TO LPT1:
??? "Now is the time to replace " + CHR(13) + CHR(10)
??? "VFP's ??? with method calls" + CHR(13) + CHR(12)
* Replace with
SET PROC TO DIRPRTCLASS.PRG ADDITIVE
oDirPrt = CREATEOBJ('DirectPrintOutput')
WITH oDirPrt
.PrinterOpen('LPT1:')
IF .PrinterIsOpen()
.DocOpen('MySpoolJob')
.DocWrite("Now is the time to replace " + CHR(13) + CHR(10))
.DocWrite("VFP's ??? with method calls" + CHR(13) + CHR(12))
.DocClose()
ENDIF
.PrinterClose()
ENDWITH