bira Posted June 24, 2004 Report Share Posted June 24, 2004 Gente, seguinte... Como diz o nosso amigo JACK o estripador vamos por partes(eheheheh): 1-NA TXTPREVIEW que comando é esse: SetMTxtPreview( .t., 5, 2, .f., .t. ) e pra que serve cada parametro? 2-Na impressao até a primeira pagina ta ok, depois quando pula pra segunda pagina ele vai desconfigurando, ou seja depois da segunda pagina vai comecando a pagina sempre mais para baixo... ABAIXO MEU RELATORIO: SetMTxtPreview( .t., 5, 2, .f., .t. ) IF M_MODO = 1 oPrn := tDosPrn():New(ALLTRIM(SIS_1POR)) ELSEIF M_MODO = 2 // Arquivo ARSPOOL := "TELA.PRN" oPrn := tDosPrn():New(ARSPOOL,.T.) Endif oPrn:lCompress:=.T.//modo comprimido NLINHA:=0 pag :=0 total :=0 select receber set order to 5 seek dat1 softseek do While rc_venc<=dat2 .and. ! eof() select cliente set order to 1 seek receber->rc_clie select receber if alltrim(cliente->cl_raza)cl_raza)>alltrim(alu2) skip loop endif if nlinha>55 .or. pag=0 caber("Relatorio de Contas a Receber",,I17) oprn:Say(++NLINHA, 0,"Documento Dt.Emissao Vencimento Pagamento Cliente Valor Juro Total Vlr.Pago") endif oprn:Say(++NLINHA, 0, strzero(rc_docu,6)+"-"+strzero(rc_parc,2)+rc_tipo) oprn:Say(NLINHA, 12, dtoc(rc_emis)) oprn:Say(NLINHA, 23, dtoc(rc_venc)) oprn:Say(NLINHA, 34, dtoc(rc_pgto)) oprn:Say(NLINHA, 45, strzero(rc_clie,4)+"-"+left(cliente->cl_raza,40)) oprn:Say(NLINHA, 91, trans(rc_valo,"@E 99,999.99")) oprn:Say(NLINHA,101, trans(rc_juro,"@E 9,999.99")) oprn:Say(NLINHA,110, trans(rc_valo+rc_juro,"@E 99,999.99")) oprn:Say(NLINHA,120, trans(rc_pago,"@E 99,999.99")) total+=rc_pago DbSkip() Enddo oprn:Say(++nLinha, 0, replicate("-",136)) oprn:Say(++nLinha, 0, "TOTAL:") oprn:Say(nLinha, 119, trans(total,"@E 999,999.99")) oPrn:EndPage() oPrn:End() ofont:end() IF M_MODO = 2 TxtPreview( arspool, "Contas a Receber/Recebidas", .t.,,, oPrn,ODLG ) endif END SELECT(SELANT) DBSETORDER(ORDERANT) Return .T. ***************** static proc Caber ***************** PARAMETERS titulo,nCol,COMANDO SoftHouse:=ALLTRIM(SIS_1NOM) pag := pag + 1 nCol :=IF(nCol=NIL,80,nCol) COMANDO :=IF(COMANDO=NIL,I10,COMANDO) dataatu :="Em "+dtoc(date())+" as "+LEFT(TIME(),5)+" horas - Pag:"+STR(pAg,3) empresa :=ALLTRIM(EMP_FANT) titulo :=SUBSTR(titulo,1,nCol-LEN(dataatu)-1) if pAg=1 oPrn:Startpage() ELSEIF NLINHA>55 oPrn:EndPage() oPrn:Startpage() endif nlinha:=0 oPrn:Say(++nlinha, 0,i10+empresa) oPrn:Say( nlinha, nCol-LEN(SoftHouse),SoftHouse) oPrn:Say(++nlinha, 0, REPLICATE("-",nCol)) oPrn:Say(++nlinha, 0, titulo) oPrn:Say( nlinha, nCol-LEN(dataatu) , dataatu) oPrn:Say(++nlinha, 0, REPLICATE("-",nCol)+COMANDO) RETURN(.t.) Muita paz a todos Bira prosoftt@bol.com.br Quote Link to comment Share on other sites More sharing options...
karinha Posted June 24, 2004 Report Share Posted June 24, 2004 // Liga / Desliga o Preview do Contador de Paginas Bira! // Veja TEST.PRG ke vem junto como o Exemplo By Ednaldo Rolim! SetMTxtPreview( .t., 5, 2, .f., .t. ) // Contador de Páginas! Mostra e Desliga // Brinque com o TEST.PRG ke ele colocou junto, ke é MOLEZA! Você vai entender! // USE TEST GO TOP cPorta := "LPT1" cFile := "TEST.PRN" nLin := 1 nPag := 0 // Controla a quantidade de LINHAS ke serão impressas em CADA PÃGINA Man! nLinMax := 60 // 65 Numero de Linhas a Imprimir na Página Bira! Verifique TEST.PRG nItens := nTotal := 0 oPrn:= TDosPrn():New( cFile ) // If nLin+1 > nLinMax // se passou a linha maxima... oPrn:Say( ++nLin, 001, Repl("-", 132) ) nLin:= 1 // volta contador para 1 Endif // nova pagina Bira // // Verifique a batizinha de compilação By Ednaldo Rolim! clipper test /n/m clipper txtprev /n/m // Não esqueça de incorporar isto clipper tdosprn /n/m // Não esqueça de incorporar isto blinker fi test, txtprev, tdosprn lib fget @\fw..\include\fivewin.lnk // E Isto! test // Esta é a classe mais fácil e rápida de se entender, pois foi desenvolvida, pelo MAIOR USUARIO DE WORKSHOP.EXE the best do Planeta: Ednaldo Alves Rolim. Qualquer dúvida, envie um e_mail para ele: edrol@uol.com.br Resposta demora, mas ke vem, vem! Se você frequenta o FORUM internacional, talvez você o encontre por lá! Tente! // Verifique onde ele COMPRIME as letras, se não me engano, é... // oPrn:Command( oPrn:cNormal ) // Modo Normal oPrn:Say( nLin, 00, PadC( cTitulo, 79 ) ) // O Titulo da Pagina! oPrn:Command( oPrn:cCompress ) // Modo Comprimido Para o Resto do Texto! // // TE ENCONTRO NO SEGUNDO ENCONTRO DE FIVEWINNERS NO BRASIL, em breve NESTE CHANNEL! Combine sua VINDA, com o TODO PODEROSO Vagner Wirts the best of the World! Abraços. João Santos São Paulo-Brasil (11) 3106-2832 a Noite karinhannah@ubbi.com.br 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.