Gostaria da ajuda de vcs... estou precisando elaborar uma função que ajusta a fonte de acordo com a necessidade...
Em qualquer parte do relatorio
Imprimir em impressoras matriciais, jato de tinta, laser, etc...
/*
Função fImprime...
cTexto - Texto a ser impresso...
nLin - Posiçãoi da linha
nCol - Posição da coluna
cFonte - Fonte de impressão utilizada
nTamanho - Tamanho da fonte
cNegrito - Indica se é NEGRITO ou NÃO
cSublinhado - Indica se é SUBLINHADO ou NÃO
cItálico - Indica se é ITÁLICO ou NÃO
*/
nFunc = 0 // total de funcionarios
nTotal = 0 // total dos rendimentos
nLin = 1
nPag = 0
nMaxLin = 65 // numero máximo de linhas
select func
go top
do while !eof()
// CABEÇALHO
if nLin = 1
nPag++
fImprime( "RELATORIO DE FUNCIONARIOS", ++nLin, 001, "Times New Roman",12, "S", "N", "S ")
fImprime( "Pag.: " + StrZero( nPag,3 ), nLin, 124, "Arial", 8, "S", "N", "N" )
fImprime( Repl("-", 132), ++nLin, 001, "Times New Roman", "S", "N", "N" )
fImprime( "NOME ENDERECO SALARIO", ++nLin, 001, , "Times New Roman", "S", "N", "N" )
fImprime( Repl("-", 132), ++nLin, 001, "Times New Roman", "S", "N", "N" )
endif
// CORPO DO RELATÓRIO
fImprime( nome , ++nLin, 001, "Courier New", "S", "N", "S" )
fImprime( endereco, Lin, 042, "Courier New", "N", "N", "N" )
fImprime( Transform( salary, "@R 999,999,999.99" ), nLin, 085, "Courier New", "N", "N", "S" )
skip
nFunc++
nTotal+= salario
if nLin+1 > nMaxLin // se passou a linha maxima
fImprime( Repl("-", 132), ++nLin, 001, "Times New Roman", "S", "N", "N" ))
nLin:= 1
endif
enddo
fImprime( Repl("-", 132), ++nLin, 001, "Times New Roman", "S", "N", "N" ))
fImprime( "Total de Funcionarios : " + alltrim( Tran( nFunc,"999,999" ) ), ++nLin, 001, "Times New Roman", "N", "N", "N" ))
fImprime( Transform( nTotal, "@R 999,999,999.99" ), nLin, 119, "Times New Roman", "N", "N", "N" ))
use
Qual a melhor classe a ser utilizada?
Observe as linhas e os parâmetros definidos na impressão...
Conto com a ajuda e sugestão de vcs.. :)Pos
Grato
Farley