evertonlb Posted June 29, 2015 Report Share Posted June 29, 2015 Amigos, nada muito importante mas...Para colocar um rodapé nos relatórios usando a TPrinter, tem que ser feito meio que no braço" vendo a linha que se encontra e mandando imprimir, ou tem como colocar algo no endpage()? Att. Everton Quote Link to comment Share on other sites More sharing options...
kapiaba Posted June 30, 2015 Report Share Posted June 30, 2015 Não. Quote Link to comment Share on other sites More sharing options...
Ariston Santos Posted June 30, 2015 Report Share Posted June 30, 2015 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. Quote Link to comment Share on other sites More sharing options...
evertonlb Posted July 1, 2015 Author Report Share Posted July 1, 2015 Valeu Ariston... Ajuda e muito amigo.. Na realidade comecei a mexer nos relatórios e tava fazendo com a intenção de fazer uma função... igual a tua, só que piorzinha! rsrsrs Valeu mesmo brother! Att. Everton Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.