Bug 189575 The 2 APIs don't work.
ICubeQueryUtil.getMemberValueIterator( TabularCubeHandle cubeHandle, String dataBindingExpr, ICubeQueryDefinition queryDefn ) ICubeQueryUtil.getMemberValueIterator( TabularCubeHandle cubeHandle, String targetLevel, ILevelDefinition[] higherLevelDefns, Object[] values ) The 2 APIs don't work. Please verify and correct them, or Crosstab sort and filter may throw runtime exception. Thanks.
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/olap/data/impl/aggregation/sort/AggregationSortHelper.java
{
	private List keys;
	AggrResultRowComparator( List keys )
	{
		this.keys = keys;
	}
	public int compare( Object arg0, Object arg1 )
	{
		IAggregationResultRow obj1 = (IAggregationResultRow) arg0;
		IAggregationResultRow obj2 = (IAggregationResultRow) arg1;
		List keyValue1 = new ArrayList( );
		List keyValue2 = new ArrayList( );
		for ( int i = 0; i < keys.size( ); i++ )
		{
			SortKey sk = (SortKey) keys.get( i );
			for ( int j = 0; j < sk.getAggrKeys( ).length; j++ )
			{
				keyValue1.add( obj1.getAggregationValues( )[sk.getAggrKeys( )[j]] );
				keyValue2.add( obj2.getAggregationValues( )[sk.getAggrKeys( )[j]] );
			}
			keyValue1.add( obj1.getLevelMembers( )[sk.getLevelKeyIndex( )].getKeyValues( )[0] );
			keyValue2.add( obj2.getLevelMembers( )[sk.getLevelKeyIndex( )].getKeyValues( )[0] );
		}
		return CompareUtil.compare( AggregationSortHelper.toObjArray( keyValue1 ),
				AggregationSortHelper.toObjArray( keyValue2 ),
				AggregationSortHelper.toDirectionArray( this.keys ) );
	}
}