Justificar Texto ???
Até agora, nunca vi algum que conseguisse
justificar texto nos relatórios QReport ou
em algum outro tipo de gerador de relatórios.
Já estou desesperado, preciso justificar
textos, da mesma forma que o MS-Word
justifica texto, não não encontro nada na
Internet.
SERÁ QUE ALGUEM PODE ME AJUDAR ??? :(
justificar texto nos relatórios QReport ou
em algum outro tipo de gerador de relatórios.
Já estou desesperado, preciso justificar
textos, da mesma forma que o MS-Word
justifica texto, não não encontro nada na
Internet.
SERÁ QUE ALGUEM PODE ME AJUDAR ??? :(
Eniorm
Curtidas 0
Respostas
Carnette
21/08/2003
Voce já experimento este compoente para justificar ??
http://www.carnette.kit.net/D5/eccjusti.zip
http://www.carnette.kit.net/D5/eccjusti.zip
GOSTEI 0
Joilson_gouveia
21/08/2003
Use/adapte a função abaixo:
303 - Justificar Texto
function Justifica(mCad:string;mMAx:integer):string;
var
mPos,mPont,mTam,mNr,mCont:integer;
mStr:string;
begin
mTam:=Length(mCad);
if mTam>=mMax then
Result:=copy(mCad,1,mMax)
else
mStr:=´´;
mCont:=0;
mPont:=1;
mNr:=mMax-mTam;
while mCont<mNr do
begin
mPos:=pos(mStr,copy(mCad,mPont,100));
if mPos=0 then
begin
mStr:=mStr+´ ´;
mPont:=1;
continue;
end
else
begin
mCont:=mCont+1;
Insert(´ ´,mCad,mPos+mPont);
mPont:=mPont+mPos+length(mStr);
end;
Result:=mCad;
end;
end;
EX.:
Memo1.lines[i]:=justifica(memo1.lines[i],60 {Nº de caracteres possiveis da linha});
303 - Justificar Texto
function Justifica(mCad:string;mMAx:integer):string;
var
mPos,mPont,mTam,mNr,mCont:integer;
mStr:string;
begin
mTam:=Length(mCad);
if mTam>=mMax then
Result:=copy(mCad,1,mMax)
else
mStr:=´´;
mCont:=0;
mPont:=1;
mNr:=mMax-mTam;
while mCont<mNr do
begin
mPos:=pos(mStr,copy(mCad,mPont,100));
if mPos=0 then
begin
mStr:=mStr+´ ´;
mPont:=1;
continue;
end
else
begin
mCont:=mCont+1;
Insert(´ ´,mCad,mPos+mPont);
mPont:=mPont+mPos+length(mStr);
end;
Result:=mCad;
end;
end;
EX.:
Memo1.lines[i]:=justifica(memo1.lines[i],60 {Nº de caracteres possiveis da linha});
GOSTEI 0
Eniorm
21/08/2003
Use/adapte a função abaixo:
303 - Justificar Texto
function Justifica(mCad:string;mMAx:integer):string;
. . .
Legal, mas essa dica vc tirou do DTDelphi , não é mesmo???
Eu já testei mas não obtive resultados satisfatórios, vc já
testou ???
Mas de qualquer forma, obrigado pela ajuda..., e se souber
mais alguma coisa me ajude, pq assim vc, com certeza vai
estar ajudando a muitos outros!!!
T+
GOSTEI 0
Eniorm
21/08/2003
Voce já experimento este compoente para justificar ??
http://www.carnette.kit.net/D5/eccjusti.zip
Ae cara, esse componente q vc passou funciona Ok!
Obrigado mesmo, cara. Vc naum sabe a árvore
q vc quebrou !!!
[b:906d423b8e]GALERA, BAIXEM ESSE COMPONENTE PARA JUSTIFICAR
TEXTOS NO RELATÓRIO, FUNCIONA MESMO !!!!!!!!!!!!!![/b:906d423b8e]
GOSTEI 0