COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: snowy on 14 May 2013 05:43:43 AM

Title: descendants function - re-ordering hierarchy
Post by: snowy on 14 May 2013 05:43:43 AM
I'm using the descendants function to return all members from a hierarchy and finding it really useful, especially in conjunction with the Level Indentation property. However I'm struggling to change the order it displays.

For example, I have the following item:

descendants( [GRAND TOTAL], 3,  beforewithmember )

This returns a list with the higher levels first, like this:

GRAND TOTAL
   SUBTOTAL 1
      Line Item 1
      Line Item 2
      Line Item 3
   SUBTOTAL 2
      Line Item 4
      Line Item 5
      Line Item 6

...and so on.

However my users are requesting that we display the details first and the subtotals at the end, like this:

      Line Item 1
      Line Item 2
      Line Item 3
   SUBTOTAL 1
      Line Item 4
      Line Item 5
      Line Item 6
   SUBTOTAL 2
GRAND TOTAL


Does anyone know a way of doing this? All I've found is this ominously empty thread (http://www.cognoise.com/index.php?topic=9997.0)