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

windows 7 32bit, trying to print from an existing old dos foxpro 2.0 prg a report, barcode no print

Status
Not open for further replies.

titoneon

MIS
Dec 11, 2009
335
US
Hi Guys,
I just replaced an old comp that was running win xp pro 32bit and it is capable to run a prg file from foxpro 2.0 Dos, that
runs a report that prints a form with text and some barcodes, the printer is an HP LASERJET 2100 with a parallel port interface and connected to the xp machine parallel port

the new machine is running Windows 7 32bit and i can run the Foxpro dos prg file no problem but the new machine does not have a parallel port so i just got a new cable that goes from the parallel printer port to the USB port in the computer and also running a program named "DOSprn 1.79" Version, this will allow the dos program to print, the problem is, that is not printing the barcodes and it is printing a lot of ascii codes, in other words it is not working as suppose to be, of course inside the prg file there are a lot of code escape sequences to print, type of differents fonts, etc, also i run the prg file, by running a batch file that has a utility to convert some of the text in barcode, think the problem resides on the barcode that is too old for be able to run in Win 7.

The utility is named "BARCODE LEADER from Laurel System" and the batch file is composed as this

rem bl it is actually a bl.com that can accept this parameters below /p3 /l3 the P3 is for hp laserjet and l3 is 3 line height
bl /p3/l3
f:\foxpro2\foxprol -t mfg_all
rem the mfg_all is the prg file

i just installed the hp laserjet 2100 pcl6 driver but some text are printing correctly from the foxpro dos report but some part of the report is not printing correctly and the barcode it is not printing at all and i am getting like 4 pages of garbage ascii codes printed.

I am worndering if i need to have a parallel port in the new computer or if it is a driver issue, or i need another utitlity to interpret the text to be barcode cause of windows 7 ?

I actually did something else, i just shared the printer on the xp machine, then i installed that printer in windows 7 by selecting the shared printer and printing there but still the result is the same no barcode and a lot of garbage printed.
I know it is an old dos prg file but it is extense an no way to change it to another version for now.
any one have experienced something like this ?
Thanks in advance
 
Even if you share the printer on the XP machine and print from W7, it is W7 that is doing the printing using its own printer driver. So that option won't help.
I'm guessing the biggest issue is having a compatible driver on the W7 machine.
Printing barcodes with VFP though is real easy. You simply print using a barcode font instead of something like 'Courier' or 'Arial'. You don't need escape codes at all.
So, that said, is there any way to run the code through VFP instead of FP DOS, or maybe just create records that VFP could print?


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
>, think the problem resides on the barcode that is too old for be able to run in Win 7.
> The utility is named "BARCODE LEADER from Laurel System" and the batch file is composed as this
...

>i just shared the printer on the xp machine, then i installed that printer in windows 7 by selecting the shared printer and printing there but still the result is the same no barcode and a lot of garbage printed.

From that I would deduct the bl.com utility prepares PCL codes which print as barcode (graphics). If, as you say, this component doesn't work, yes, of course you instead just get garbage chars.

I doubt the hardware is a problem, a usb device emulating a parallel port is working 1:1 as a parallel port towards software printing to LPT1.

So, how about installing HyperV on the Win7 system and installing an XP system in there, using that for printing. The XP Dos box seems better fitting the needs of your DOS prg. Or try a DOS alternative, not command.com, this has moved away from being DOS compatible, really. Powershell runs on this, .NET assemblies can be used, etc. This is a Windows command shell, not a DOS, it is compatible, but not DOS. Get a copy of TameDOS, for example and try to run on that, including the bl.com tool. Also, did you forget soemthing, a config? An INI? Is he Win7 PCL6 driver different from the XP one? Most probably, or not?

Bye, Olaf.
 
>, think the problem resides on the barcode that is too old for be able to run in Win 7.
> The utility is named "BARCODE LEADER from Laurel System" and the batch file is composed as this
...

>i just shared the printer on the xp machine, then i installed that printer in windows 7 by selecting the shared printer and printing there but still the result is the same no barcode and a lot of garbage printed.

From that I would deduct the bl.com utility prepares PCL codes which print as barcode (graphics). If, as you say, this component doesn't work, yes, of course you instead just get garbage chars.

I doubt the hardware is a problem, a usb device emulating a parallel port is working 1:1 as a parallel port towards software printing to LPT1.

So, how about installing HyperV on the Win7 system and installing an XP system in there, using that for printing. The XP Dos box seems better fitting the needs of your DOS prg. Or try a DOS alternative, not command.com, this has moved away from being DOS compatible, really. Powershell runs on this, .NET assemblies can be used, etc. This is a Windows command shell, not a DOS, it is compatible, but not DOS. Get a copy of TameDOS, for example and try to run on that, including the bl.com tool. Also, did you forget soemthing, a config? An INI? Is he Win7 PCL6 driver different from the XP one? Most probably, or not?

Bye, Olaf.
 
Hi Dave,
I will use that, as the last option cause there are a lot of different reports(form types) there and besides the user, will have to still using the old dos application and then Jump to the new little appl. that i can do just for printing those reports(forms), of course yes that is one option but i will use that as the last option, i can print to the printer w/o a problem from windows, the foxpro dos application prints too the report but never print correctly after some particular location and the last part of the report or at the end of the report, i called it a report but it is actually like a form, the barcodes never got printed and it is a lot garbage printed there.
 
Seems like a double post resulting from posting at almost the same time. Sorry.
 
Hi Olaf,
No the printer driver is the same, so your recommendation is to use TameDos ?
Can you give me a little overview on this Tamedos ?
so you recommend to use " HyperV ", in the past i did this, and was having problem with the mappings and actually setting the printers
Any other explanation will be very appreciated
Thanks a lot

 
Well TameDOS is a DOS (clone), you download and install it on Windows, and have a DOS bosx seperate from the Windows "Dos box", which really has got more than just a DOS. The incompatibility of it might make the DOS program not works as you're used to. So simply try TameDOS, you won't waste much time, the worst thing is, it fails, too. Still you will then know it's not TameDOS or command.com or cmd.exe, but something else, eg the printer driver or hardware. So either it simply works or you eleminate one error factor.

Bye, Olaf.
 
Ok, will give a try, so can be installed on win 7 ?
cause i went into the website, and does not mention win 7 at all
Thanks
 
Hi Olaf,
I installed the TameDos, it looks pretty easy, i am running the Foxpro dos appl no problem but when printing i get the same result.
The thing is, that the bl.com with the parameters, is located in my startup folder as well is checked in the Msconfig.
Will TameDos see that BL.COM as a process already running, or do i need to add it somewhere to the Tamedos, for it to interpret and process in under his ?
Cause while printing still the garbage is comming out in the form, where the barcode is suppose to be printed, and that is the reason of the BL.COM running in the background.
Thanks
 
Well, I have no idea about how to work with bl.com, but from what you say I'd expect it to be started, perhaps somewehre in an AUTOEXEC.BAT file at DOS start? Can you go back to the working XP machine and find out how it's started as a background process. My memory doesn't serve me well in regard of DOS. I have used it, but not professionally and never with printer drivers or tools like that. I remember fragments like MEMMAKER. If you bought that bl.com, didn't it come with any documentation?

Bye, Olaf.
 
Olaf,
The problem seen to be the bl.com, i can print from the dos program even if i don't use the Tamedos(tamedos, actually does not resolve the problen cause the bl.com is not been taking in consideration under it) so that said, this mean the program i use, print to the usb port, the driver used as hp laserjet pcl6 works ok , as well as hp laserjet 4 and even the PCL5 driver.

But when the form is printed and reach the part the needs to print the Barcode then, is when garbage is printed and takes about 3 pages of printing garbage.

so the bl /p3/l3(p3=laserjet printer, l3= 3 lines height for the barcode) is not running under windows 7 neither under the Tamedos(or it is imcopatible) all what bl.com does in the background is to interpret that the code inside of my prg file can be capable to print a barcode.
in my foxpro dos prg code these "@@" in front of the text and after the text, will make that text to print as barcode, for example if have in my prg, one of these code line, by the way this is what is not getting printer as part of when i am printing the form, these lines below are not getting printer and causing the form, to print about 3 pages or garbage.

Code:
 set print on
 ? "         JOB #/BALL #                             PART #"
 ? "   @@"+jobnumbr+ball_no+"@@"  && this should be printed as a barcode
 ?? "                                @@"+part_no+"@@"  && this should be printed as barcode
 ? " Apex Machine company"  && just text should be printed
 EJECT
 SET PRINT OFF
 SET CONSOLE ON
 RETURN
but the bl.com, in the manual says you need to use in your code to print barcode these "@@ 1234 @@", this always work in win 98, win xp, win 2000, now under windows 7 does not work.
I think i have probably two options,
1- redo the machine to run windows xp, i hate this
2- install and try "windows virtual pc" and install windowz xp mode, don't even know if will work either, the problem is under windows xp mode, i will need to map drives, select the printer i need, i mean, i tried in the past for something else and i was complete confuse on how to do the mappings and add the printers there, don't know maybe me.

Thanks for any help or any other background application that allow me to change what symbols or escape sequence i need to be able to print barcodes from the dos appl under windows 7
 
I don't know, all that seems to be missing is bl.com taking effect. So find out how it is started on your old computer.

Otherwise now it's really the time printing barcodes in Windows would be easier to solve.

I can't help you any further, sorry.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top