procedure TXSDXX.DataSetCAfterOpen(DataSet: TDataSet);
var
value: double;
begin
DataSet.First;
Value:=0;
while not DataSet.Eof do
begin
Value:=double(Value)+DataSet.FieldByName('MRDJ').AsFloat;
DataSet.Next;
end;
DataSetZ.Open;
DataSetZ.Edit;
DataSetZ.FieldByName('LSZD1').AsFloat:=value;
DataSetZ.Post;