Bug 201527 The cross grandtotal should be in the Grand Total list in "Filter by" tree[1102]
Description: The cross grandtotal should be in the Grand Total list in "Filter by" tree[1102] Build number: 2.2.0.v20070829-0630 Steps to reproduce: 1, New a crosstab has row dimension and column dimension 2, Specify row and column grandtotals 3, Create a filter on crosstab 4, Check the Filter by list of filter condition Expected result: The cross grandtotal(Aggregate On: All) should be in the Grand Total list but not in the Measures list Actual result: The cross grandtotal is in the Measures list
data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/CubeQueryUtil.java
return isLeafLevel( query.getEdge( ICubeQueryDefinition.COLUMN_EDGE ),
				target )
				|| isLeafLevel( query.getEdge( ICubeQueryDefinition.ROW_EDGE ),
						target );
	}
	/**
	 * 
	 * @param edge
	 * @param target
	 * @return
	 */
	private boolean isLeafLevel( IEdgeDefinition edge, DimLevel target )
	{
		if ( edge == null )
			return false;
		IDimensionDefinition dim = (IDimensionDefinition) edge.getDimensions( )
				.get( edge.getDimensions( ).size( ) - 1 );
		if ( dim.getName( ).equals( target.getDimensionName( ) ) )
		{
			IHierarchyDefinition hier = (IHierarchyDefinition) dim.getHierarchy( )
					.get( 0 );
			ILevelDefinition level = (ILevelDefinition) hier.getLevels( )
					.get( hier.getLevels( ).size( ) - 1 );
			if ( target.getLevelName( ).equals( level.getName( ) ) )
				return true;
		}
		return false;
	}