ADOQuery1.sql.Text:=' select * from Cari_Kart where Firma_id='''+ADOQuery2Cari_Kart_Ref.Value+'''';
ADOQuery1.Open;
if ADOQuery2.RecordCount=1 then begin
ADOQuery1ToplamBorc.Value:='1';
ADOQuery1.close;
end;
procedure TForm3.ADOQuery1CalcFields(DataSet: TDataSet);
var
toplamBorc : Real;
begin
try
ADOQuery1.Close;
ADOQuery1.sql.Text:=' select SUM(FATURATUTARI ) AS TOPLAM FROM FATURALARINOLDUĞUTABLO where Firma_id='''+ADOQuery2Cari_Kart_Ref.Value+'''';
ADOQuery1.Open;
TOPLAMBORC:= ADOQuery1.fielbyname('TOPLAM').value;
ADOQuery1.close;
end;
procedure TForm36.ADOQuery1CalcFields(DataSet: TDataSet);
var
toplamBorc : Real;
begin
try
ADOQuery1.Close;
ADOQuery1.sql.Text:=' select SUM (Fatura_Toplam) AS TOPLAM FROM CIKISFATURARAPOR where Firma_id='''+ADOQuery2Cari_Kart_Ref.Value+'''';
ADOQuery1.Open;
TOPLAMBORC:= ADOQuery1.fieldbyname('TOPLAM').value;
ADOQuery1.close;
finally
end;
end;
procedure TBakiye_Rapor.ADOQuery1CalcFields(DataSet: TDataSet);
var
Toplam:real;
begin
ADOQuery2.close;
while not ADOQuery2.eof do
begin
if ADOQuery2Cari_Kart_Ref.Text=ADOQuery1Refenrans_No.Text then
begin
Toplam:=Toplam+ADOQuery2Fatura_Toplam.Value;
ADOQuery2.next;
end
else
begin
ADOQuery2.next;
end;
ADOQuery2.open;
ADOQuery1TOPLAMM.Value:=Toplam;
end;
end;
var
B : TBookmark;
FaturaToplam : double ;
begin
AdoQueryCariKart.first;
while not AdoQueryCariKart.eof do
begin
FaturaToplam := 0;
try
B :=AdoQueryCariKart.getbookmark;
ADOTablegirisfatura.first;
while not ADOTablegirisfatura.eof do
begin
FaturaToplam := FaturaToplam + ADOTablegirisfatura.FieldByName('Fatura_Toplam').value ; //baştan aşşa
ADOTablegirisfatura.next;
end;
finally
AdoQueryCariKart.gotobookmark(B);
AdoQueryCariKart.edit;
AdoQueryCariKartGiris_Fatura.value := FaturaToplam ;
AdoQueryCariKart.post;
AdoQueryCariKart.freebookmark(B);
end;
AdoQueryCariKart.next;
end;
end;