// C:\FWH\SAMPLES\CMSOFTG2.PRG
#include "FiveWin.ch"
#include "Colores.ch"
#include "print.ch"
FUNCTION Main()
// 1 2 3 4 5 6 7 8 9
Local aDatos := {;
{"Juan 1","Pago 1","Juan Aguarde un momento","Pedro","1000","Algo 1"},;
{"Juan 2","Pago 2","Juan Aguarde un momento","Pedro","2000","Algo 2"},;
{"Juan 3","Pago 3","Juan Aguarde un momento","Pedro","3000","Algo 3"},;
{"Juan 4","Pago 4","Juan Aguarde un momento","Pedro","4000","Algo 4"},;
{"Juan 5","Pago 5","Juan Aguarde un momento","Pedro","5000","Algo 5"},;
{"Juan 6","Pago 6","Juan Aguarde un momento","Pedro","6000","Algo 6"},;
{"Juan 7","Pago 7","Juan Aguarde un momento","Pedro","7000","Algo 7"} ;
}
ImprimoRecibos( aDatos )
RETURN nil
STATIC FUNCTION ImprimoRecibos( aDatos )
LOCAL oPrn, oFont,n := 0, nRow, i := 1, aSizes
LOCAL cFilePdf := cTempFile( ".\", ".pdf" )
LOCAL cMsg := "Exportando a PDF: Aguarde un momento"
LOCAL cImagem := ".\FONDO.JPG"
// PRINT oPrn DOC "RECIBOS" PREVIEW MODAL
// PRINTER oPrn FILE cFilePdf // NAME 'SysCtrl CFDI Report'
PRINT oPrn PREVIEW FILE "RECIBOS.pdf" MODAL
DEFINE FONT oFont NAME "Arial" SIZE 36, 70 BOLD
oPrn:SetPage(5) // LEGAL
oPrn:SetPortrait() //Vertical
nRow := 4
PAGE
oPrn:SayImage( 0, 0, "FONDO.JPG", 4900, 7000, NIL, .T., { METRO_ROJO1 , METRO_ROJO2, METRO_GRIS3 } )
@ nRow, 1 PRINT TO oPrn TEXT aDatos[i,1] SIZE 7,.5 CM FONT oFont LASTROW nRow ALIGN "C"
@ nRow, 1 PRINT TO oPrn TEXT aDatos[i,2] SIZE 7,.5 CM FONT oFont LASTROW nRow ALIGN "C"
@ nRow, 1 PRINT TO oPrn TEXT aDatos[i,3] SIZE 7,.5 CM FONT oFont LASTROW nRow ALIGN "C"
@ nRow, 1 PRINT TO oPrn TEXT aDatos[i,4] SIZE 7,.5 CM FONT oFont LASTROW nRow ALIGN "C"
@ nRow, 1 PRINT TO oPrn TEXT aDatos[i,5] SIZE 7,.5 CM FONT oFont LASTROW nRow ALIGN "C"
@ nRow, 1 PRINT TO oPrn TEXT aDatos[i,6] SIZE 7,.5 CM FONT oFont LASTROW nRow ALIGN "C"
@ nRow, 1 PRINT TO oPrn IMAGE "..\bitmaps\olga1.jpg" SIZE 4, 4 CM LASTROW nRow
ENDPAGE
ENDPRINT
oFont:End()
// MSGRUN( cMsg, "Usuario", {|| Shellexecute( 0,"open", cFilePdf ) } )
// MSGRUN( cMsg, "Usuario", {|| Shellexecute( 0,"open", "RECIBOS.PDF" ) } )
RETURN NIL
// FIN / END