tengo un cliente que puede imprimir de 1 a 5000 etiquetas seguidas (o mas)
como la etiquetadora térmica hacia saltos le puse el siguiente control:
en el formulario le pego el objeto mscomm y al dar aceptar hago lo siguiente
select cursor
scan
<Aquí monto la etiqueta en la variable "var1">
do while .T.
do while thisform.mscom1.OutBufferCount>0
enddo
thisform.mscom1.output=var1
DO CASE
CASE thisform.mscom1.CommEvent01
do while thisform.mscom1.CommEvent01
wait wind "Esperando ..." nowait
enddo
CASE thisform.mscom1.CommEvent04
thisform.mscom1.OutBufferCount=0
loop
CASE thisform.mscom1.CommEvent06
thisform.mscom1.OutBufferCount=0
loop
CASE thisform.mscom1.CommEvent08
thisform.mscom1.OutBufferCount=0
loop
CASE thisform.mscom1.CommEvent09
thisform.mscom1.OutBufferCount=0
loop
CASE thisform.mscom1.CommEvent10
thisform.mscom1.OutBufferCount=0
loop
CASE thisform.mscom1.CommEvent11
thisform.mscom1.OutBufferCount=0
loop
ENDCASE
exit
enddo
endif
endscan
y en evento onComm del objeto mscomm
function OnComm
*** ActiveX Control Event ***
DO CASE
CASE This.CommEvent01
thisform.erroretiqueta=.T.
CASE This.CommEvent04
thisform.erroretiqueta=.T.
CASE This.CommEvent06
thisform.erroretiqueta=.T.
CASE This.CommEvent08
thisform.erroretiqueta=.T.
CASE This.CommEvent09
thisform.erroretiqueta=.T.
CASE This.CommEvent10
thisform.erroretiqueta=.T.
CASE This.CommEvent11
thisform.erroretiqueta=.T.
ENDCASE
sele traza
append blank
replace etiqueta with TMPETI001.I_UNICO
replace erroreven with This.CommEvent
no se que hago mal pero el caso que se come etiquetas, me las mezcla. Un
Caos pero solo si imprimo muchas
Leer las respuestas