anchor.diff:  
       procedure CalculateHierarchy;
       procedure Calculate;
  -    procedure Clear;
  +    procedure Clear(const aClearSettings : boolean);
   
       // internal or test functions
       function GetRecords (const aVerticalKeys, aHorizontalKeys : TStringList): TCardinalList; overload;
  
positive.code:   begin
      currentCoord := '';
      tmpIndex := FVerticalKeysIndex;
      for k := 0 to FVerticalGroupByDefs.Count -1 do
      begin
        tmpValue := FDataProvider.GetDatum(i).GetPropertyByFieldName(FVerticalGroupByDefs.Get(k).FieldName);
        tmpKeyValue := GetIndexKeyValue(tmpValue, FVerticalGroupByDefs.Get(k));
        FVerticalValues.Get(k).AddValueIfMissing(tmpKeyValue);
  
        currentCoord := BuildKey(currentCoord, tmpKeyValue);
        if k < (FVerticalGroupByDefs.Count - 1) then
          tmpIndex := tmpIndex.GetSubIndex(tmpKeyValue)
        else
        begin
          tmpIndex.GetValueList(tmpKeyValue).Add(i);
          tmpIndex.KeysValues.Add(tmpKeyValue);
        end;
      end;
  
      tmpIndex := FHorizontalKeysIndex;
      for k := 0 to FHorizontalGroupByDefs.Count -1 do
      begin
        tmpValue := FDataProvider.GetDatum(i).GetPropertyByFieldName(FHorizontalGroupByDefs.Get(k).FieldName);
        tmpKeyValue := GetIndexKeyValue(tmpValue, FHorizontalGroupByDefs.Get(k));
        FHorizontalValues.Get(k).AddValueIfMissing(tmpKeyValue);
        currentCoord := BuildKey(currentCoord, tmpKeyValue);
        if k < (FHorizontalGroupByDefs.Count - 1) then
          tmpIndex := tmpIndex.GetSubIndex(tmpKeyValue)
        else
        begin
          tmpIndex.GetValueList(tmpKeyValue).Add(i);
          tmpIndex.KeysValues.Add(tmpKeyValue);
        end;
      end;
  
      tmpList := FRecordCoordinates.Find(currentCoord) as TCardinalList;
  
negative.code:   FFormula := aSource.Formula;
  end;
  
  class function TmGroupByDef.CheckOperationKindCompatibility(const aOperationKind: TmGroupByOperationKind; const aDataType: TFieldType): boolean;
  begin
    if (aOperationKind =  gpoDateDay) or (aOperationKind = gpoDateYear) or (aOperationKind =  gpoDateMonth) or (aOperationKind = gpoDateTheMonth) or (aOperationKind = gpoDateDay) or (aOperationKind = gpoDateTheDay) or (aOperationKind = gpoDateQuarter) or (aOperationKind = gpoDateTheQuarter) then
      Result := aDataType in [ftDate, ftDateTime, ftTimeStamp, ftTime]
    else
      Result := true;
  //  gpoDistinct, gpoDateYear, gpoDateMonth, gpoDateTheMonth, gpoDateDay, gpoDateTheDay, gpoDateQuarter, gpoDateTheQuarter, gpoFirstLetter, goFormula
  end;
  
  { TmCalculationDef }
  
  constructor TmCalculationDef.Create;
  