minor fix for calc total function in RxDBGrid - tnx ronin

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2484 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2012-08-04 17:31:52 +00:00
parent dd4607f1c9
commit b44d85767b

View File

@ -3929,10 +3929,12 @@ begin
case FValueType of case FValueType of
fvtSum: fvtSum:
begin begin
if F.OldValue <> null then
FTestValue := FTestValue - Float(F.OldValue);
if not F.IsNull then if not F.IsNull then
begin
if F.OldValue <> null then
FTestValue := FTestValue - Float(F.OldValue);
FTestValue := FTestValue + F.AsFloat; FTestValue := FTestValue + F.AsFloat;
end;
end; end;
fvtMax: if not F.IsNull then fvtMax: if not F.IsNull then
FTestValue := Max(FTestValue, F.AsFloat); FTestValue := Max(FTestValue, F.AsFloat);