Jump to content
Fivewin Brasil

Rodapé em Relatório com TPrinter - Resolvido


evertonlb

Recommended Posts

Amigo, eu faço assim:

   DEFINE FONT oFont NAME "Arial"   SIZE 0, -12 OF oPrn
   DEFINE FONT oFon2 NAME "Verdana" SIZE 0, -12 OF oPrn
   nRow  := 3 // Linha inicial
   nPag  := 1 // Página inicial
   mLarg := oFon2:nHeight
   nTab  := oPrn:nHorzRes()/20
   nSpc  := (oPrn:nHorzRes()-(2*nTab)) / 90
   nCls  := {nTab+(nSpc*00),; // Coluna 1
             nTab+(nSpc*06),; // Coluna 2
             nTab+(nSpc*50),; // Coluna 3
             nTab+(nSpc*62),; // Coluna 4
             nTab+(nSpc*73),; // Coluna 5
             nTab+(nSpc*82),; // Coluna 6
             nTab+(nSpc*90) } // Coluna 7

  *... Imprime o cabeçalho
  *... Impressão dos dados
   nRow++ // Proxima linha
   PulaPag(oPrn,@nRow,mLarg,nTab,nCls,oFont,@nPag,nTp,nPp,nSpc,oPen,lLogo,.T.) // Verifica se chegou no final da área imprimível e imprime o cabeçalho e rodapé

A função PulaPag imprime o rodapé e cria a nova página já com o cabeçalho.

STATIC FUNCTION PulaPag(oPrn,nRow,mLarg,nTab,nCls,oFont,nPag,nTp,nPp,nSpc,oPen,lLogo,lCab)
   LOCAL nUltLin
   IF (nRow*mLarg) >= ( oPrn:nVertRes()-(nUltLin*mLarg) ) // Se chegou no final da área imprimível
      IF lFoot // Imprime o rodapé
         oPrn:Say(oPrn:nVertRes()-(5*mLarg), nCls[1], "TOTAL DESTA PAGINA: R$ "+ALLTRIM(TRANS(nPagTot,"@E 999,999.99"))+" ("+Vlr_Ext(nPagTot,80)+")", oFont )
         oPrn:Say(oPrn:nVertRes()-(4*mLarg), nCls[1], "FORMA DE PAGAMENTO: "+oIt20, oFont )
         oPrn:Say(oPrn:nVertRes()-(4*mLarg), nCls[7], "VALIDADE: "+ALLTRIM(oIt12), oFont,,,,1)
         oPrn:Say(oPrn:nVertRes()-(3*mLarg), nCls[1], "BANCO: "+ALLTRIM(oIt17)+"; AG: "+ALLTRIM(oIt18)+"; C/C: "+Alltrim(oIt19), oFont )
         oPrn:Say(oPrn:nVertRes()-(3*mLarg), nCls[7], "LOCAL DE ENTREGA: "+ALLTRIM(oIt21), oFont,,,,1)
      ENDIF
      nRow  := 3 // Reseta a linha inicial
      nPag ++ // Incrementa a página
      oPrn:EndPage()  // Finaliza a página
      oPrn:StartPage() // Cria nova págida
      * Imprime o cabçalho
   ENDIF
RETURN NIL

Talvez já ajude um pouco.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...