- Erick Bergsma
- PowerBuilder
- Friday, 6 December 2019 04:57 PM UTC
Hello all... Seasons greeting...
My question today has to do with the RUN command in PowerBuilder.
I am re-writing some logic to print labels. We are moving away from an ActiveX and Intermec label printer, to using ZPL with Zebra Printers.
In the new Windows 10/PB 2017 environment we are in, the OCX is s-l-o-w. 40 seconds between printing labels, where in the Windows 7/PB 9 environment, it's about 1 or 2 seconds between labels.
I have the proper ZPL code structure, and using Notepad, or Word, or Notepad++ directly, the labels print just fine.
...but when I transfer the call to inside a RUN command, it won't print.
For example, I create a file, and in a Windows DOS prompt, I issue this...
notepad /p "lubelabelzpl.txt"
… the formatted label prints just fine.
In PB, I issue Run('notepad /p "lubelabelzpl.txt"') , and it won't print.
same issue, if I try to use the "echo" command...
in the DOS window, I can issue this...
echo "^XA^ILR:SAMPLE.GRF^FS^FO10,20^ASN,36,15^FDLUBE 37052-1 Pill Bottle^FS^FO700,20^ASN,36,15^FD10195631^FS^FO10,80^AFN,36,02^FDLUBRICATION SYS - COIL CONVEYOR^FS^FO10,140^ASN,36,15^FD1434859: #1 CPM EXIT COIL CONVEYOR GB (W/C)^FS^FO10,200^AFN,36,02^FDKENL PROC CMC1 CRS1 EXIT CONV LUBE^FS^FO10,260^ASN,36,15^FD201-220 Gear Oil Analysis^FS^FO10,320^AFN,36,02^FDCompon Hrs:____ Lube Hrs:____ 07/22/2019^FS^FO10,380^ASN,36,01^FDSamp B4 Chg[ ] 1st Samp Aft Chg[ ] Routine Samp[ ]^FS^FO700,80^BY4^B7B,15,0^FD12345678^FS^XZ" >\\HAPS01\ITSOLZEB
… and it prints just fine
I issue it in PBC via the RUN command...and it doesn't print, doesn't even go to the queue.
Any ideas?
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.