anchor.diff:  
   procedure TmSummaryValue.Init;
   begin
  -  if (FDefinition.SummaryOperator = soCount) or (FDefinition.SummaryOperator = soCountDistinct) then
  -    FIntegerValue.Value:= 0;
  +  if (FDefinition.SummaryOperator = soCount) or (FDefinition.SummaryOperator = soCountDistinct) or
  +     (FDefinition.SummaryOperator = soAverage) or (FDefinition.SummaryOperator = soAverageNotNull) then
  +    FIntegerValue2.Value:= 0;
   end;
   
   function TmSummaryValue.GetValueAsString: string;
   begin
     Result := '-';
     if (FDefinition.SummaryOperator = soCount) or (FDefinition.SummaryOperator = soCountDistinct) then
  -    Result := FIntegerValue.AsString
  +    Result := FIntegerValue2.AsString
  +  else
  +  if (FDefinition.SummaryOperator = soAverage) or (FDefinition.SummaryOperator = soAverageNotNull) then
  +  begin
  +    if FieldTypeIsInteger(FDefinition.FieldType) then
  +    begin
  +      if FIntegerValue.IsNull or (FIntegerValue2.AsInteger = 0) then
  +        Result := '-'
  +      else
  +        Result := FormatFloat('#,##0', FIntegerValue.AsInteger / FIntegerValue2.AsInteger);
  +    end
  +    else if FieldTypeIsPascalDouble(FDefinition.FieldType) then
  +    begin
  +      if FDoubleValue.IsNull or (FIntegerValue2.AsInteger = 0)  then
  +        Result := '-'
  +      else
  +      begin
  +        if FieldTypeIsFloat(FDefinition.FieldType) then
  +          Result := FormatFloat('#,##0.0000', RoundDoubleToStandardPrecision(FDoubleValue.Value / FIntegerValue2.AsInteger))
  +        else if FieldTypeIsDate(FDefinition.FieldType) then
  +          Result := DateToStr(Round(FDoubleValue.Value / FIntegerValue2.AsInteger))
  +        else if FieldTypeIsTime(FDefinition.FieldType) then
  +          Result := TimeToStr(FDoubleValue.Value / FIntegerValue2.AsInteger)
  +        else
  +          Result := DateTimeToStr(FDoubleValue.Value  / FIntegerValue2.AsInteger);
  +      end;
  +    end
  +    else
  +      Result := '';
  +  end
     else
     begin
       if FieldTypeIsInteger(FDefinition.FieldType) then
  
positive.code:     procedure SetSummaryValues (aScreenValues: TmSummaryScreenValues);
    end;
  
    TmSummaryOperator = (soCount, soCountDistinct, soSum, soMax, soMin);
  
    { TmSummaryDefinition }
  
  
negative.code:     soSum : Result := 'Sum';
      soMax : Result := 'Max';
      soMin : Result := 'Min';
      soAverage : Result := 'Average';
      soAverageNotNull : Result := 'Average not null';
    end;
  end;
  
  