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

System Crashes When trying to print

Status
Not open for further replies.

rianeiromiron

Programmer
Jul 1, 2001
151
GT
Dear Everyone:

I´ve been having some serious trouble when trying to print to certain printers. Some are locally instaled and some are on the network. The problem is that after making a preview or printing to the printer and then make a second preview or report the system crashes real bad. On some machines the ALL-PANIC mode turns on (I mean Windows' text mode blue screen); on some machines they reset as if someone had pushed the reset button.
In one case I´m trying to print to an HP LaserJet and in other to a LEXMARK E210. However, if I change the default printer (at the Windows level) to for example an Epson Printer I have no problems. So I can conclude this is a driver problem. I got to this after talking to a VFP friend who told me he had problems when trying to prin to a Lexmark printer. I have to mention that I had the same trouble with an inkjet Xerox printer.
Has anyone dealth with this. I´m in a real problem here.

By the way, I´m using VFP 6. The developing machine has Win98b and so do the crashing machines.

Thank you all
 
HP Printers are a well know problem. Have you install service pack 5 for VFP 6. I fixes many of these issues. Try that first, and then go looking for new printer drivers. If I remember correctly the HP IV driver was fairly stable.

 
Boy I really can't type tonight. Let me try that again.

HP Printers are a well know problem. Have you installed service pack 5 for VFP 6. It fixes many of these issues. Try that first, and then go looking for new printer drivers. If I remember correctly the HP IV driver was fairly stable.
 
I know what you mean, generally switching printer drivers at the default level does work, but switching them while your program is running does not always leave VFP in a happy condition. The main thing to avoid (from my own experience) is trying to change the driver during previewing - i.e. after the driver has been evaluated in order to get the page size etc by VFP.

Get the user to select the printer BEFORE the report is run.

I like to compile my reports into my .exe files - so I can't use some of the clever print driver clearing techniques that people suggest on here (loading the .frx as a table and then clearing some of the expressions). But I do use a piece of code to 'tidy' the .frx BEFORE I compile, this just convinces VFP that all printers are HP Laser Jet IIIP compatible and removes some of the odder things that get embedded. If you want a copy, email me at griff@finedata.com and I'll send over the .prg file.

Regards
Griff
[smile]

(I'm not planning to post it as I think it's one of my scruffier bits of code and I'm embarrassed!)
 
A lot of times this happens because of, belive it or not, the video driver. A former coworker that used to work for MS tech support told me about that. Anyway, there is also an article on the MS web site regarding this. That is, if it's still there:

Q183522 - FIX: Divide by Zero Creates Err with Third-Party Drivers

Dave S.
 
Thanks to all who answered.

I took the service pack approach. No need to recompile. Just copied the new vfp*.dll to the resetting machine's \window\system folder and that's all.

Again, thank you all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top