Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compiler Error

Status
Not open for further replies.

sunwindandsea

Programmer
Dec 20, 2001
116
US
I have had an application running on several Windows XP Pro workstations without any problems for two years. Recently, I had to modify several procedures but not the procedure that prints reports. After modifying the procedures (no changes were made to the report printing procedure) the program locks up during the report printing procedure after sending the first 19 line to the printer. If I change the report to print to a text file the problem goes away. Each line of code between the equal sign lines beginning with ‘@ ##,## SAY’ causes the application to lock up.

OS Windows XP Pro Service Pack (Compiled and run on this OS)
FoxPro 2.6 for MS-DOS

Any suggestions.

A sample of the code is shown below:



@ 20,00 SAY " City: "+lsCity
@ 21,00 SAY " State: "+lsState
@ 21,32 SAY "Zip: "+lsZip
@ 23,02 SAY "Carrier: " + lCarrier
@ 23,48 SAY "ShipVia: " + lShipVia

=================================================================================
@ 26,00 SAY " Item Number Description Order"
@ 26,58 SAY " ABC U/M ABC Price"

@ 27,00 SAY replicate(chr(61),20) + " " + replicate(chr(61),28) + " " +;
replicate(chr(61),08) + " " + replicate(chr(61),10) + " " +;
replicate(chr(61),10)

DO WHILE nLine < nTotLines
z = alltrim(str(nLine))
@ ln,00 say cItemNo&z
IF SEEK(cItemNo&z, "IcItm")
@ ln,21 say IcItm->fdescript pict replicate('x',28)
@ ln,50 say PADL(cItemQty&z, 8, " ") pict "9999999999"
@ ln,60 say PADC(ALLTRIM(cItemUM&z), 10, " ")
@ ln,70 SAY TRANSFORM(cItemPri&z, "999,999.99")
=================================================================================
 
What printer driver are you using on XP? Have you tried using the Generic / Text Only driver?

Rick
 
Rgbean:

Good reminder. The problem was incorrect printer mapping.

I connect to this printer using a USB cable. I print from DOS applications by sharing this printer and mapping to a parallel printer port using the NET USE command on the same workstation that connects to the printer using a USB cable.

Thanks for thr help, RGBean.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top