Jump to content
Fivewin Brasil

TDOSPRN E TPRINTER


yasmin

Recommended Posts

Olá pessoal, eu vejo muito falar sobre classes do tipo TDOSPRN E TPRINTER para impressão, eu fiz um programa que tem relátorios e funcionou normal, porém eu não sei dizer com precisão que classe eu usei. Como faria para saber que classe eu usei e qual a diferença entre elas. Detalhe uso FW192.

MARCELO - Vila Velha/ES

Link to comment
Share on other sites

A classe TDOSPRN, faz impressão tipo DOS. Já a classe TPRINTER, faz impressão em modo gráfico.

Se o seu relatório você utilizou os comandos, como: PRINTER oPrn PREVIEW, você está utilizando a classe TPRINTER.

Kleyton

Clipper5.2E+Clipper5.3b+Blink7+FW2.0d

cleitonbala@bol.com.br

Link to comment
Share on other sites

Veja um exemplo abaixo:

select CLIENTES

set order to 2

go top

lin := 1

Col := 04

inicio := .t.

nPag := 0

nLinMax := 57

oPrn := tDosPrn():New( LPT1 )

begin sequence

oPrn:StartPage() // optional

do while !eof()

if Lin = 1

nPag++

oPrn:Say(lin,Col,nomemp_get)

lin++

oPrn:Say(lin,Col,dademp01+space(01)+"Data : " + dtoc(date()))

lin++

oPrn:Say(lin,Col,"Relatorio de Entidades e seus Credores")

lin++

oPrn:Say(lin,Col,repl("-",62) + " Pagina: " + strzero(nPag,4))

lin++

oPrn:Say(lin,Col,"Cliente Fone Situacao")

inicio = .f.

endif

oPrn:Say(lin,Col,left(NOME_CLI,35) + " " + FONE_CLI + " " + if(SITU_CLI="A","Ativo","Inativo"))

lin++

if Lin+1 > nLinMax // se passou a linha max

oPrn:Say(lin,Col,repl("-",76))

lin++

oPrn:Say(lin,Col,"RELAT CAM INFORMATICA Emissao: " + time())

oPrn:EndPage()

Lin:= 1 // volta contador para 1

endif // nova pagina

select CLIENTES

skip

enddo

oPrn:Say(lin,Col,repl("-",76))

lin++

oPrn:Say(lin,Col,"RELAT TESTE INFORMATICA Emissao: " + time())

oPrn:EndPage()

oPrn:End()

end sequence

Kleyton

Clipper5.2E+Clipper5.3b+Blink7+FW2.0d

cleitonbala@bol.com.br

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...