We are printing directly to the Dos port in order to stop windows
from intercepting the print process so that the Customers Account Statement
will print faster.
DO WHILE NOT EOF("Customer")
*-- Before we print each Customers Account Statement we issue the following
m.cFileName = oApp.cTempDir +"\"+ SUBSTR(SYS(2015), 3) + ".prn"
SET SAFETY OFF
SET PRINTER TO (m.cFileName)
SET CONSOLE OFF
SET PRINTER ON
*-- we do the usual print commands and this is all captured to the file m.cFileName
? Customer.custadd1 AT 5
? Customer.custadd2 AT 5 etc etc etc
*-- when we are ready to print we issue the following...
SET PRINTER OFF
SET CONSOLE ON
SET PRINTER TO
COPY FILE (m.cFileName) TO lpt1.dos
ERASE (m.cFileName)
SKIP +1 IN Customer
ENDDO
The above has been working fine except when going to a local printer and we
want to print 100's of statements, the computer comes back with an error "Error writing to device"
after about the 5th /6th Statement print.
Does anybody know why this is causing an error.
My Regards
John Hussey