CODE
with dtmiza.qryiza do
begin
close;
sql.Clear;
sql.add (Select Codigo, Nome , DtCadastro, DtTeIni From Alunos where QuoteToStr (TxtDataInicial.Text);
Sql.Add('where (DtTeIni >= :d1) ');
ParambyName('d1').value := FormatDateTime ('dd/mm/yyyy' , StrToDate (TxtDataInicial.Text));
open;
end;
begin
close;
sql.Clear;
sql.add (Select Codigo, Nome , DtCadastro, DtTeIni From Alunos where QuoteToStr (TxtDataInicial.Text);
Sql.Add('where (DtTeIni >= :d1) ');
ParambyName('d1').value := FormatDateTime ('dd/mm/yyyy' , StrToDate (TxtDataInicial.Text));
open;
end;
Mas ai eu preciso mostrar no relatorio o valor total da cnh desse aluno(a) mas ai eu não sei como filtrar para que cada aluno que vai buscar mostrar o total da carteira dele
CODE
with QryTotal do
begin
close;
sql.Clear;
sql.add ('Select sum(Valor)as "SOMA" From Lancamento where tipo = 1 and Codigo' );
open;
end;
begin
close;
sql.Clear;
sql.add ('Select sum(Valor)as "SOMA" From Lancamento where tipo = 1 and Codigo' );
open;
end;
Então ai como eu filtrari isso ?
