Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ticket printer
Message
From
20/02/2010 12:39:44
 
 
To
20/02/2010 12:01:33
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 8
OS:
Vista
Miscellaneous
Thread ID:
01450058
Message ID:
01450069
Views:
62
>SET DEVICE TO PRINTER
> *impresion del ticket
> rlin=0
> rcol=0
> @ PROW(),rcol say "Grupo de Especialidades" font "arial",8
> *rlin=rlin+1
> @ PROW()+1,rcol say " Farmaceuticas Génesis"
> *rlin=rlin+1
> @ PROW()+1,rcol say " S.A. de C.V."
> @ PROW()+1,rcol say "27 de Febrero No.1713 Esq.Ceiba Col. Atasta" font "arial",8
> @ PROW()+1,rcol say "C.P.86100 Villahermosa,Tabasco" font "arial",8
> @ PROW()+1,rcol say "Tel.9933525983 RFC.GEF 031223-HT2" font "arial",8
> @ PROW()+1,rcol say "R."+TRIM(mremlet) font "arial",8
> @ PROW(),rcol+15 say "F." font "arial",8
> @ PROW(),rcol+18 say mfecha pict "99/99/9999" size 1,12 font "arial",8
> @ PROW()+1,rcol say "Descripción / Marca" font "arial",8
> @ PROW()+1,rcol say "Cant. Codigo Precio Importe" font "arial",8
> SELECT tabpv
> GO TOP
> mart=0
> mtotf=0
> DO WHILE .not. EOF()
> mclamed=clamed
> mcantidad=cantidad
> mmedica=medica
> mprecio=precio
> mimporte=importe
> @ PROW()+1,rcol say mmedica font "arial",8 size 1,35
> *rlin=rlin+1
> @ PROW()+1,rcol say mcantidad pict "999" size 1,4 font "arial",8
> @ PROW(),rcol+5 say mclamed pict "@!" size 1,15 font "arial",8
> @ PROW(),rcol+21 say mprecio pict "99,999.99" size 1,10 font "arial",8
> @ PROW(),rcol+32 say mimporte pict "99,999.99" size 1,10 font "arial",8
> *rlin=rlin+1
> mart=mart+mcantidad
> mtotf=mtotf+mimporte
> SKIP
> ENDDO
> @ PROW()+1,rcol say "Total" font "arial",8
> @ PROW(),rcol+15 say mtotf pict "99,999.99" size 1,10 font "arial",8
> @ PROW()+1,rcol say "Pago " font "arial",8
> @ PROW(),rcol+15 say mpago pict "99,999.99" size 1,10 font "arial",8
> @ PROW()+1,rcol say "Cambio" font "arial",8
> @ PROW(),rcol+15 say mcambio pict "99,999.99" size 1,10 font "arial",8
> @ PROW()+2,rcol say letras(mtotf) font "arial",8
> @ PROW()+2,rcol say "# art" font "arial",8
> @ PROW(),rcol+8 say mart pict "999" size 1,4 font "arial",8
> @ PROW(),rcol+15 say TIME() pict "99:99" size 1,6 font "arial",8
> @ PROW()+2,rcol say "Gracias por su compra" font "arial",8
> *@ rlin+16,rcol say CHR(27)+"i"
> *? CHR(29)+CHR(86)+CHR(0)
> ? CHR(&H1B);"i"
> SET DEVICE TO SCREEN
> SET PRINTER TO && esto funciona para mandar directamente a la impresión

You should get some responses now. It's been a long time since I used those commands, and I will try to dig up some code, but for now try:

set alternate to prout.txt && make this file unique per user
set alternate on
? "Some data to send to the printer"
?? ESCAPE_SEQUENCE+"whatever you are sending to the printer"
*--More stuff here etc
set alternate off
set alternate to
copy prout.txt > prn


Also, check out rawprint here on the UT...
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform