Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Thermal Printing Issue
Message
 
À
06/09/2002 19:49:07
Andy Roth
Neyenesch Printers
Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00697826
Message ID:
00698402
Vues:
28
I just finish an app for an eltron label printer; this printers creates lables from text that is send to it like ie.


N
O
S2
D7
ZT
Q614,27
q784
B10,100,0,3,3,7,75,B,"-part-"
A60,300,0,2,3,3,N,"-part-"
A60,400,0,2,2,2,N,"-desc1-"
A60,500,0,2,2,2,N,"-desc2-"
A750,10,1,4,2,2,N,"DIDELBA"
X30,30,3,750,500
P1

If this is your situation

I wrote a program that sends the text to the printer from a memo field and that it substitutes variables (-varname-) for actual data and send it to the lpt1

Ie
\prg

Private Array AA(2),CH,dd1,dd2,F
SET CENTURY OFF
F = DTOC(DATE())
CH = Chr(10)
Select lavles
Seek Thisform.fPrint.Value *** look for the lable to be printed
If Found()
Select vFacturas *** view with the acutal data to be printed
Scan For !Deleted() And vFacturas.tipo == Thisform.fPrint.Value;
AND !vfacturas.inpreso
Select lables
Alines(AA,etiquetas.ETIQUETA)
Set Device To Screen
Set Printer To
For Y = 1 To vfacturas.etiquetas
For x = 1 To Alen(AA)
*** replace var with data
AA(x) = Strtran(AA(x),"-part-",ALLTRIM(vfacturas.parte))
AA(x) = Strtran(AA(x),"-fecha-",ALLTRIM(F))
dd1 = SUBSTR(ALLTRIM(vfacturas.descripcion),1,25)
dd1 = STRTRAN(dd1,'\','\\')
dd1 = STRTRAN(dd1,'"','\"')
IF LEN(vfacturas.descripcion) > 25
dd2 = SUBSTR(ALLTRIM(vfacturas.descripcion),25,50)
dd2 = STRTRAN(dd2,'\','\\')
dd2 = STRTRAN(dd2,'"','\"')
AA(x) = Strtran(AA(x),"-desc2-",dd2)
ENDIF
AA(x) = Strtran(AA(x),"-desc1-",dd1)
AA(x) = Strtran(AA(x),"-qty-",ALLTRIM(STR(vfacturas.cantidad)))
*!* send current line to printer
??? AA(x) + CH
Next
NEXT
replace vfacturas.inpreso WITH .t.
thisform.Refresh
Set Printer To
Endscan
Endif

/prg

I hope this helps a little






>I have design a report that I want to go to a Eltron 2442 Thermal Printer.
>Actually it's a UPS Thermal Printer but that is the maker and model.
>I can print a Wordpad Document to it, Run a test pager to it
>but if I select it via REPORT FORM PROMPT it goes to the default printer
>VFP5 or VFP6. I have set the default printer to the printer in the Windows
>2000 workstations setting and I get and error to the sorts PRINTER DRIVER NOT FOUND.
>
>This printer is on LTP1.
>
>I just need to test this type of printer to see if we can use it for shipping labels. Once we prove that we will purchase one
B.D.H.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform