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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing problem - repeats first page until cancel

Status
Not open for further replies.

bjitima

Technical User
Dec 29, 2004
63
US
We are having a very strange problem that we can't seem to find a good answer for.

We recently wrote a program for a customer of ours so that they can print an ordering guide book and then use that to choose which items that they would like to get from our warehouse. The customer has 26 locations. Between these locations they have two different types of printers, both HP Laser printers. The program is written in FoxPro 2.6 for DOS. We are sending the print job to the printer through a network map to LPT2. ('net use lpt2 \\computer\printer' and then 'SET PRINT TO LPT2' in the program)

The program works perfectly fine at all of the locations except for three. At these three stores, the software sends the job to the printer, and the printer then prints the first page over and over until it either runs out of paper or we cancel it.

Between three of us, we have checked everything that we can think of. All of the .DBF, .CDX, and .PRG files have been verified as the same between working and non-working locations. We have verified that all of the system environment variables that we refer to are accurate. We have verified that the print drivers match.

Has anyone else seen something similar to this? Does anyone have any suggestions as to what could possibly fix the problem?

Thanks,
Ben
 
So are you saying the application actually finished sending the print job rather than repeatedly looping and sending the same one?
You said there are two different types of printers. At the 3 'bad' locations, do they have all the same printers or a variety?
You may need to verify the printer drivers themselves and see how they're set up for queuing. Directly, spooled, ...
In fact, the printer driver may need to be reinstalled or updated.
Also, check the .FRX file and see what the "expr", "tag" and "tag2" memo fields looks like. See if there is anything funky in there or better yet, empty them out.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Yes, the application seems to finish sending the print job to the printer. You can open Printers and Faxes and show the Document Queue and it shows 64KB/551KB, says Printing, and just sits on that. The application frees up and we are able to do other things or exit the program.

At the three bad locations they have both types of printers. IE store A has printer type 1 and it works, store B has printer type 1 and it doesn't work. Store C has printer type 2 and it works, store D has printer type 2 and it doesn't work.

I have compared the drivers between a working store and a non-working store and the driver versions match. The queue settings are all set the same. One of the IT people at the customer's site uninstalled and reinstalled one of the non-working printers and that didn't fix it, either.

As for an .FRX file, we aren't using one. We are doing

set devi to pri
@ 1,1 say 'Book contents'
@ 1,2 say 'Book contents'
etc...
ejec
set devi to scre
 
It could also be that screen stuff is getting sent to the printer too.
Are you setting the printer back off again using SET PRINTER OFF?

Something like:
SET PRINTER OFF
set devi to scre
SET PRINTER TO
SET PRINTER TO &&... yes, this command is needed twice
.
.
.



-Dave Summers-
[cheers]
Even more Fox stuff at:
 
I added that and it didn't make a difference.
 
I can only suspect an OS or print spooler problem rather than a Foxpro problem then. Possibly a corrupt spooler file.

Maybe try stopping the spooler service and clearing out any files you find in the C:\Windows\System32\spool\PRINTERS folder.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top