anchor.diff:      end;
     end;
   
  +var
  +  y, m, d : word;
   begin
     case aGroupByDef.OperationKind of
       gpoDistinct:
  
positive.code: 
      procedure CalculateHierarchy;
      procedure Calculate;
  
      // internal or test functions
      function GetRecords (const aVerticalKeys, aHorizontalKeys : TStringList): TCardinalList; overload;
  
negative.code:       Result := IntToStr(YearOf(TryToConvertToDate(aValue)));
      gpoDateMonth:
        Result := IntToStr(MonthOf(TryToConvertToDate(aValue)));
      gpoDateTheMonth:
      begin
        DecodeDate(TryToConvertToDate(aValue), y, m, d);
        Result := IntToStr(y) + '-' + IntToStr(m);
      end;
      gpoDateDay:
        Result := IntToStr(DayOf(TryToConvertToDate(aValue)));
      gpoDateTheDay:
      begin
        DecodeDate(TryToConvertToDate(aValue), y, m, d);
        Result := IntToStr(y) + '-' + IntToStr(m) + '-' + IntToStr(d);
      end;
      gpoDateQuarter:
        Result := IntToStr(((MonthOf(TryToConvertToDate(aValue)) - 1) div 3) + 1);
      gpoDateTheQuarter:
      begin
        DecodeDate(TryToConvertToDate(aValue), y, m, d);
        Result := IntToStr(y) + '-' + IntToStr(((m - 1) div 3) + 1);
      end;
      gpoFirstLetter:
        begin
          Result := VarToStr(aValue);
  