FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour PRINT ( SOLUCIONADO )
Posts: 1074
Joined: Fri Oct 07, 2005 01:56 PM
PRINT ( SOLUCIONADO )
Posted: Fri Feb 13, 2009 09:24 PM
Estimados

como saber el final de una pagina de la impresora

estoy usando print pero con una impresora ibm propinter me funciona bien, cambio a otra y no funca, :-)

este es el codigo


	PRINT oPrn PREVIEW MODAL
	oPrn:SetPage( 1 )

   DEFINE FONT aFont[1] NAME "COURIER NEW" 		  SIZE 0, -10 BOLD OF oPrn
   DEFINE FONT aFont[2] NAME "COURIER NEW" 		  SIZE 0, -10 	  	 OF oPrn
	DEFINE FONT aFont[3] NAME "ABADI MT CONDENSED" SIZE 0, -8 BOLD OF oPrn

	oPrn:cDocument := "caja diaria"
	oPrn:StartPage()

	nRowStep := oPrn:nVertRes()/40
   nColStep := oPrn:nHorzRes()/110

	nRowStep *= 1
	oPrn:Say(nRowStep,nColStep*2, Parame->Nom_Emp,aFont[1] ) ; nRowStep += aFont[1]:nHeight
	oPrn:Say(nRowStep,nColStep*2, Parame->Dir_Emp,aFont[2] ) ; nRowStep += aFont[2]:nHeight
	oPrn:Say(nRowStep,nColStep*2, Parame->Ciu_Emp,aFont[2] ) ; nRowStep += aFont[2]:nHeight
	oPrn:Say(nRowStep,nColStep*2, Parame->Fon_Emp,aFont[2] ) ; nRowStep += aFont[2]:nHeight

	oPrn:Say( nRowStep,nColStep*43, "CAJA DIARIA FECHA "+dtoc(_fecemi) , aFont[3] )

	nRowStep += aFont[3]:nHeight * 1.5

	oPrn:Say( nRowStep, nColStep*1, "  Fecha     Dctos.   Número   Rut Cliente   Valor    Comprobante    Total Pie", aFont[1] )

	do while Docu_BF->( !eof() )

		Docu_FP->( dbSeek(  Docu_BF->Tip_Doc + Docu_BF->Num_Doc ) )

		nPie += Docu_FP->TotPie
		aadd( aDocu, Docu_BF->Tip_Doc + Docu_BF->Num_Doc )
		oPrn:Say( nRowStep, nColStep*1, Dtoc( Docu_BF->Fec_Emi )+ "  " +;
		 											  Docu_BF->Tip_Doc + "  " +;
													  Docu_BF->Num_Doc +"  " +;
													  Docu_Bf->Rut_Doc +"  " +;
													  Trans(Docu_Bf->Total, "@E 999,999,999" )+"  " +;
			 										  Docu_FP->Comprob+ "  " + ;
													  trans( Docu_FP->TotPie, "@E 99,999,999" ) , aFont[2] )
			nTotal += Docu_BF->Total
		endif

		nRowStep += aFont[2]:nHeight * 1.5
		if nRowStep > oPrn:nVertRes()-100
			nRowStep := oPrn:nVertRes()/40
			ENDPAGE
			PAGE
		endif
		Docu_BF->( dbSkip() )
	enddo
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: PRINT ( SOLUCIONADO )
Posted: Wed Mar 04, 2009 07:15 PM

Patricio,

Como lo solucionastes ? :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1074
Joined: Fri Oct 07, 2005 01:56 PM
Re: PRINT ( SOLUCIONADO )
Posted: Thu Mar 05, 2009 01:11 PM
Hola

esta linea

Code (fw): Select all Collapse
      
if nRowStep > oPrn:nVertRes()-100
     nRowStep := oPrn:nVertRes()/40
     ENDPAGE
     PAGE
endif


queda de la siguiente manera, sacado de la clase Report

Code (fw): Select all Collapse
        
nBottom := oPrn:nVertRes() - (Int( oPrn:nLogPixelY() * 0.2 ))
..
..
..
if nRowStep > nBottom
            nRowStep := oPrn:nVertRes()/40
            ENDPAGE
            PAGE
        endif
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl

Continue the discussion