anchor.diff:  begin
     FDefinition:= TmSummaryDefinition.Create;
     FDoubleValue:= TNullableDouble.Create();
  +  FDoubleValue2 := TNullableDouble.Create();
     FStringValue:= TNullableString.Create();
     FIntegerValue:= TNullableInteger.Create();
  +  FIntegerValue2 := TNullableInteger.Create();
     FUniqueValues:= TmStringDictionary.Create();
   end;
   
  
positive.code:           end;
            if not FUniqueValues.Contains(tmpString) then
            begin
              FIntegerValue.Value := FIntegerValue.Value + 1;
              FUniqueValues.Add(tmpString, FUniqueValues);
            end;
          end;
        end;
      soSum:
        begin
          if not VarIsNull(aValue) then
          begin
            case FDefinition.FieldType of
              ftInteger, ftLargeint:
                begin
                  tmpInt:= aValue;
                  if FIntegerValue.IsNull then
                    FIntegerValue.Value := tmpInt
                  else
                    FIntegerValue.Value := FIntegerValue.Value + tmpInt;
                end;
              ftFloat, ftDateTime, ftDate, ftTime, ftTimeStamp, ftFMTBcd, ftCurrency:
                begin
                  tmpDouble:= RoundDoubleToStandardPrecision(aValue);
                  if FDoubleValue.IsNull then
                    FDoubleValue.Value := tmpDouble
                  else
                    FDoubleValue.Value := FDoubleValue.Value + tmpDouble;
                end;
            end;
          end;
        end;
      soMax:
        begin
  
negative.code:   TmSummaryValue = class
    private
      FDoubleValue : TNullableDouble;
      FDoubleValue2 : TNullableDouble;
      FStringValue: TNullableString;
      FIntegerValue: TNullableInteger;
      FIntegerValue2 : TNullableInteger;
      FUniqueValues: TmStringDictionary;
  
      FDefinition : TmSummaryDefinition;
  