ejemplo de etiquetas

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
claudiotedesco
Posts: 132
Joined: Thu Jul 31, 2008 12:05 pm

ejemplo de etiquetas

Post by claudiotedesco »

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)
User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Contact:

Re: ejemplo de etiquetas

Post by Vanguarda »

thanks friend,

for sharing this cod with us.

regards,
--
Paulo Sérgio Durço (Vanguarda)


https://hmglights.wordpress.com/
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: ejemplo de etiquetas

Post by Rathinagiri »

Thanks a lot. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
Post Reply