ejemplo de etiquetas
Posted: Tue Jul 28, 2009 12:14 pm
Hola
Les adjunto un ejemplo que arme para poder imprimir etiquetas autoadhesivas AVERY 5162.
Lo arme con la ayuda del foro. Espero que les sirva
Saludos
#include "Minigui.ch"
* impresion de etiquetas autoadhesivas AVERY 5162
FUNCTION Main()
USE BASE.DBF
DEFINE WINDOW Win_1 AT 0,0 WIDTH 300 HEIGHT 300 ;
MAIN ON INIT Etiquetas()
END WINDOW
CENTER WINDOW Win_1
ACTIVATE WINDOW Win_1
RETURN(NIL)
FUNCTION Etiquetas()
SELECT PRINTER DEFAULT TO PRINT ORIENTATION 01;
PAPERSIZE PRINTER_PAPER_LETTER;
PREVIEW
START PRINTDOC
START PRINTPAGE
LL = 0
nRow :=24
wfilacol2:= nRow
DO WHILE !EOF()
IF nRow>=260
END PRINTPAGE
START PRINTPAGE
LL = 0
nRow :=24
wfilacol2:= nRow
ENDIF
nCol :=08
FOR nEtiqueta :=01 TO 02 //2 en Linea
@ nRow,nCol PRINT BASE->CARGO_S FONT "Times New Roman" SIZE 9
nRow +=04
@ nRow,nCol PRINT BASE->APNO_S FONT "Times New Roman" SIZE 9
nRow +=04
@ nRow,nCol PRINT BASE->DIR_S FONT "Times New Roman" SIZE 9
nRow +=04
@ nRow,nCol PRINT TRIM(BASE->CP_S)+" - "+BASE->LOC_S FONT "Times New Roman" SIZE 9
nRow +=04
nCol +=105
nRow :=wfilacol2
DBSKIP()
IF EOF()
EXIT
ENDIF
NEXT
nRow = nRow + iif(LL<3,35,33)
LL = LL + 1 // Controla reduccion de linea para alinear la etiqueta
wfilacol2:= nRow
ENDDO
END PRINTPAGE
END PRINTDOC
CLOSE ALL
RETURN(NIL)
Les adjunto un ejemplo que arme para poder imprimir etiquetas autoadhesivas AVERY 5162.
Lo arme con la ayuda del foro. Espero que les sirva
Saludos
#include "Minigui.ch"
* impresion de etiquetas autoadhesivas AVERY 5162
FUNCTION Main()
USE BASE.DBF
DEFINE WINDOW Win_1 AT 0,0 WIDTH 300 HEIGHT 300 ;
MAIN ON INIT Etiquetas()
END WINDOW
CENTER WINDOW Win_1
ACTIVATE WINDOW Win_1
RETURN(NIL)
FUNCTION Etiquetas()
SELECT PRINTER DEFAULT TO PRINT ORIENTATION 01;
PAPERSIZE PRINTER_PAPER_LETTER;
PREVIEW
START PRINTDOC
START PRINTPAGE
LL = 0
nRow :=24
wfilacol2:= nRow
DO WHILE !EOF()
IF nRow>=260
END PRINTPAGE
START PRINTPAGE
LL = 0
nRow :=24
wfilacol2:= nRow
ENDIF
nCol :=08
FOR nEtiqueta :=01 TO 02 //2 en Linea
@ nRow,nCol PRINT BASE->CARGO_S FONT "Times New Roman" SIZE 9
nRow +=04
@ nRow,nCol PRINT BASE->APNO_S FONT "Times New Roman" SIZE 9
nRow +=04
@ nRow,nCol PRINT BASE->DIR_S FONT "Times New Roman" SIZE 9
nRow +=04
@ nRow,nCol PRINT TRIM(BASE->CP_S)+" - "+BASE->LOC_S FONT "Times New Roman" SIZE 9
nRow +=04
nCol +=105
nRow :=wfilacol2
DBSKIP()
IF EOF()
EXIT
ENDIF
NEXT
nRow = nRow + iif(LL<3,35,33)
LL = LL + 1 // Controla reduccion de linea para alinear la etiqueta
wfilacol2:= nRow
ENDDO
END PRINTPAGE
END PRINTDOC
CLOSE ALL
RETURN(NIL)