Due to a significant number of customers having print spooler crashes with dc_printfile, I've had to go to the DCPRINT ON function.
I have my report writing to a text file (report.txt) and then I'm loading that into an array via DELDBE singlefield. and printing the array a line at a time, with an DCPRINT EJECT inserted whenever the line contains '[ Continued ]'.
I'm running into some issues with that method when quotes and commas are in the data. Is there a better way of printing the file?
Perhaps a better way to load the report.txt file into an array than treating it as a single record ascii data file?
thanks,
bruce
dc_printfile problem and workaround
dc_printfile problem and workaround
There are only 10 kinds of people - those who understand binary and those who don't 

Re: dc_printfile problem and workaround
Bruce,
Here's another way..
local cText:=memoread('report.txt')
local nLines:=mlcount(alltrim(cText))
FOR i:= 1 TO nLines
if !empty(cLine:=memoline(cText,1024,i))
// print your line here
// or aadd it into an array
endif
NEXT
Here's another way..
local cText:=memoread('report.txt')
local nLines:=mlcount(alltrim(cText))
FOR i:= 1 TO nLines
if !empty(cLine:=memoline(cText,1024,i))
// print your line here
// or aadd it into an array
endif
NEXT
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Re: dc_printfile problem and workaround
THANK YOU... that worked perfectly! Although to be honest I expected no less from you wizards 
I had thought about using memoread, but was unaware off the mlcounrt and memoline functions and couldn't figure out how to break them out.
bruce

I had thought about using memoread, but was unaware off the mlcounrt and memoline functions and couldn't figure out how to break them out.
bruce
There are only 10 kinds of people - those who understand binary and those who don't 
