SAP Knowledge Base Article - Public

2213358 - Hierarchy order is different in Crystal Reports than it is in BEx Analyzer


  • Hierarchy displays in the incorrect order.
  • BEx Query Hierarchy order is different than what is defined in SAP BW.
  • When viewing a BEx Query in BEx Analyzer, the hierarchy displays in the expected order.
  • When viewing a BEx Query in Crystal Reports, the hierarchy displays in a different order than it displays in BEx Analyzer.


  • SAP Crystal Reports 2008
  • SAP Crystal Reports 2011
  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016

Reproducing the Issue

  1. In BEx Query Designer, create a BEx Query with at least one row, and one key figure:
    • One row with a dimension with a hierarchy. 
    • One column with a key figure.  
  2. In Crystal Reports, create a report off the BEx Query.   
  3. Create a group on the database field that contains the hierarchy on the Node ID database field.
  4. Set the group to display in a hierarchy format, by selecting the Parent Id database field in the "Hierarchical Group Options"
  5. When refreshing the report, it displays the hierarchy in a different order in Crystal Reports than what is defined for the hierarchy in SAP BW.


  • By default, when creating a group in Crystal Reports, it always sort in “Ascending” order of the field name or technical name, and this is why the hierarchy displays in different order than what is defined in SAP BW.
  • Crystal Reports does not support the BEx Query Hierarchy options defined in the BEx Query Designer, like:
    • Positions of Lower-Level Nodes: Above or Below
    • Sort by: Same as hierarchy, or Text, or Key
    • Sort Direction: Ascending, Descending
  • Crystal Reports uses MDX query to retrieve the BEx Query data set, and there is no information retrieve regarding the hierarchy order.
  • This is why a hierarchy displayed in Crystal Reports is always sorted in ascending order by default, and does not display in the same order as defined for the hierarchy in the SAP BW Cube.


  • When reporting off a BEx Query, Crystal Reports generates for each characteristic, the following database fields for the hierarchy:
    • NodeId
    • ParentNodeId
  • To display the characteristic in Crystal Reports in a hierarchy format, we need to:
    1. Create a group on the database field: “NodeId” for the characteristic that have a hierarchy.        
    2. Select “Hierarchical Grouping Options” under the menu “Report”, and associate the “ParentNodeId” for the group.
      It will then display the group in a hierarchy format, sorted in ascending order of Node Name. ( Not the description )      

See Also

  • 2055020 - Sort Order of Hierarchy Node Members is not the same in Web Intelligence when using a BICS connection
  • 1786367 - Groups are repeated when sorting hierarchical group in original order in Crystal Reports for Enterprise


Hierarchy sort order, incorrect hierarchy order, CR , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem


Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016