Fórum Duvida com QR #354447
27/02/2008
0
Valeu.
Japapdb
Curtir tópico
+ 0Posts
27/02/2008
Djjunior
Crie uma variavel private tipo soma
No BeforePrint da banda detail some-a tipo : soma := soma + strtoFloat(valor)
na banda de sumario coloque um label
No BeforePrint da banda sumario faça: lbTot.caption := formatFloat(´#,0.00´) e logo após zere a variavel - pois se vc der um preview pra depois um print o resultado final vai sair dobrado !
Gostei + 0
27/02/2008
Japapdb
tipo o meu codigo ficou assim:
var
soma:real;
procedure TForm1.DetailBand1BeforePrint(Sender: TQRCustomBand;
var PrintBand: Boolean);
begin
soma := soma + strtofloat(dbedit1.Text);
end;
================================================
procedure TForm1.SummaryBand1BeforePrint(Sender: TQRCustomBand;
var PrintBand: Boolean);
begin
label4.caption := formatfloat(´#,0.00´);
end;
mas não esta rodando esta segunda parte label4.caption :=formatfloat(´,0.00´);
esta dando um erro:
´There is no overloaded version of ´FormatFloat´ that can be called with these arguments´
Valeu!
Gostei + 0
27/02/2008
Djjunior
[b:24c25e4b92] logo após ZERE a variavel - pois se vc der um preview pra depois um print o resultado final vai sair dobrado ! [/b:24c25e4b92]
Gostei + 0
27/02/2008
Japapdb
Vlw mesmo...
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)