我写过这样的语句,但是没效果
with datasetdetail do
begin
first;
while not eof do
begin
open;
edit;
if fieldbyname('price').asstring.trim<>'' then
FieldByName('amount').AsFloat:=FieldByName('inamount').AsFloat*FieldByName('price').AsFloat
else
FieldByName('amount').asstring:='';
next;
end;
end;