printersetup()
oPrn:=PrintBegin(Titulo,.F.,lPrv,,.T.)
DEFINE FONT oFnt1 NAME 'Arial' SIZE 0,-9 OF oPrn
DEFINE FONT oFnt2 NAME 'Arial' SIZE 0,-9 BOLD OF oPrn
DEFINE FONT oFnt3 NAME 'Arial' SIZE 0,-12 BOLD OF oPrn // NESCAPEMENT 300
DEFINE FONT oFnt4 NAME 'Ms Sans SerIfl' SIZE 0,-9 OF oPrn
oPrn:lPrvModal:=.T.
oPrn:SetPortrait()
etc.etc.etc.
procedure X()
local lPrn := .f.
define dialog...
redefine button .. ACTION ( lPrn := .t., imprimir(), lPrn := .f. )
activate dialog VALID iif( lPrn, (MsgInfo( "Favor cierre la impresion antes de salir", "Usuario" ), .f. ), .t. )
return
...
...
define window oWnd title "Test Report"
CreaReporte( aRep )
activate window oWnd valid( aEval( aRep, {| cName | sendmessage( findwindow( 0,cName ), WM_CLOSE ) } ), .t. )
...
...
Functionn CreaReporte( aRep )
REPORT oReport ;
TITLE "*** LISTADO DE PRUEBA ***","",OemtoAnsi("FiveTech Software"),"" ;
FONT oFont1, oFont2 ;
HEADER "Fecha: "+dtoc(date()),"Hora: "+time() ;
FOOTER OemtoAnsi("P gina: ")+str(oReport:nPage,3) ;
PREVIEW // TO PRINTER
...
...
ACTIVATE REPORT oReport
aadd( aRep, oReport:cName )
return NIL
....
@ 3, 5 BUTTON 'Aceptar' OF oDlgReporte ;
ACTION ( FIC_EQUI2(mCODI) ,;
oDlgReporte:End() );
SIZE 50, 10
@ 3, 25 BUTTON 'Salir' OF oDlgReporte ACTION ( oDlgReporte:End() ) SIZE 50, 10
ACTIVATE DIALOG oDlgReporte CENTERED;
ON INIT ( oCODI:SetFocus() , .f. )
aEval( aRep, {| cName | sendmessage( findwindow( 0,cName ), WM_CLOSE ) } )
return .t.
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Jorge Jaurena and 49 guests