PRINT ( SOLUCIONADO )

PRINT ( SOLUCIONADO )

Postby Patricio Avalos Aguirre » Fri Feb 13, 2009 9: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


Code: Select all  Expand view
   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
User avatar
Patricio Avalos Aguirre
 
Posts: 1060
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Re: PRINT ( SOLUCIONADO )

Postby Antonio Linares » Wed Mar 04, 2009 7:15 pm

Patricio,

Como lo solucionastes ? :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41937
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: PRINT ( SOLUCIONADO )

Postby Patricio Avalos Aguirre » Thu Mar 05, 2009 1:11 pm

Hola

esta linea

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


queda de la siguiente manera, sacado de la clase Report

Code: Select all  Expand view
       
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
User avatar
Patricio Avalos Aguirre
 
Posts: 1060
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 77 guests