jimcjr


I've inherited a Visual Fox Pro application (originally written in Foxpro for Windows, but more recently compiled with VFP 7 and then VFP 9). It creates several different types of labels using the standard .LBX and .LBT files that the Foxpro label designer creates. (All of the users are running the application on Win XP SP2 machines.)

The labels were designed using a Smart Label Printer Pro/220. The label printers are hooked up as local printers (but not the default printers) on the users' PC's.

Over time, several of the users had swapped their SLP Pro/220 label printers with SLP model 240 label printers. When the users installed this newer model printer, they were smart enough to understand that after they installed the model 240, they had to rename the printer in the Windows printer list to be "Smart Label Printer Pro/220" rather than allow its normal installed name of "Smart Label Printer Model 240". Most of the time, this renaming trick worked with no problem, and the labels would print out on the Model 240, even though the Foxpro label template file had been created with the Model 220.

However, after some time of use, the label printer would quit working and the user would receive a printer error when they tried to print labels. (No specific error message was shown... the printer icon in the windows tray would just display a red question mark/trouble overlay, and the print job would just hang with this error indication. The print job was correctly being routed to the label printer, even though it was not the default printer.) The problem could be resolved by re-installing the Model 240 printer drivers, and the label printer would again start working until the next time it started giving errors. This working period could last anywhere from several hours to several weeks.

My QUESTION: Any suggestions as to what might be causing the printer to stop working Could there be some remnants of the Model 220 driver buried somewhere in the registry that, depending upon some other programs being run by the user, could somehow corrupt the Model 240 printer driver Would the problem be permanently eliminated by just re-doing the Label forms using the newer model printer Why would having to keep re-installing the driver be necessary

I'm researching this along a number of different lines... any hints or reports of similar problems would be helpful. Thanks..

Jim





Re: help needed on troubleshooting label printer problem

Naomi Nosonovsky


Are you saying that you saved the report information with the report (e.g. printer environment checked) Usually it is not recommended to save printer environment with the report, the advice here is to strip this information and rather use SET PRINTER TO NAME (myLabelPrinter) before printing the report.




Re: help needed on troubleshooting label printer problem

dni

You may try to have the latest driver version for printers and install SP1 for vfp9 and vfp7 if you don't have them installed.





Re: help needed on troubleshooting label printer problem

jimcjr

Hi...

WIth respect to your suggestion Naomi.. the label forms were created a couple of years ago by a different programmer, and the "save printer environment" WAS checked by him. While it would be nice to do as you suggest with respect to including the "Set Printer TO..." command, there are almost a dozen different labels that are being printed with print commands scattered in almost 40 different prg files. (These all get compiled into a single exe file.) We are in the process of converting the application to .NET, so no time is going to be allocated to making any changes in the Foxpro source code for this, especially since the labels are printing, most of the time anyway. However, I can make changes in the label format files. What I am searching for is hints from someone who may have experienced this type of difficulty. Would a solution rest with re-doing the format files with the newer printer model Or might I need to search the registry to remove all references to the older model printer driver Or what

For DNI.. I know we have the latest version of the drivers for the newer printer model. The current version of the application being run was compiled with VFP9 SP1, and I'm using that version of VFP to play with the label format files.






Re: help needed on troubleshooting label printer problem

dni

You may try to use:

SET REPORTBEHAVIOR 80

if you don't have a ReportListener instance specified .






Re: help needed on troubleshooting label printer problem

dni

You may also check printers name with:

GETPRINTER()

Vfp will use installed printers with names from system.






Re: help needed on troubleshooting label printer problem

JedP

After the report form... or label form ... to print use the word prompt which will allow the user to select the printer that they have configured. It will eliminate the issue of different printer names for different people.

example: report form <repo_form_name> to print prompt

jed





Re: help needed on troubleshooting label printer problem

Naomi Nosonovsky

Yes, I believe the other solution (though not really recommended) is to simply re-save the label using the correct printer information. In other words, just open your label file, go to Printer setup and select the right printer, then re-save the label. I believe it should work.



Re: help needed on troubleshooting label printer problem

jimcjr

Again, thanks to everyone for taking the time to make suggestions... but please note that the end users are running an compiledc executable.. they don't even have Foxpro installed on their machines... I cannot make changes in any prg file , so I cannot use suggestions which involve program commands, such as "report form.. to print prompt", or "set report behavior.."...

Yes, I understand that when developing new Foxpro applications, these suggestions should usually be followed, but again this is dealing with a legacy application

Thanks for the suggestion of trying the getprinter command. Again, the users don't have VFP installed on their PC's, and the nearest user is about 40 miles away from mile location. I can remotely "see" the list of printers in their Windows "Printers and Faxes" window, but it would be good to get the names that the Foxpro application would see on their machines.

So far, re-doing the label form to incorporate the newer model label printer number sounds like what I'll try doing next.

Jim






Re: help needed on troubleshooting label printer problem

Naomi Nosonovsky

If labels are not included into the executable I agree with you that it may be a solution in this particular case.