Bug 179661 NPE throws out when preview the attached report [1102]
Description: NPE throws out when preview the attached report [1102] Build number: 2.2.0.v20070328-0630 Steps to reproduce: 1, Using attached report design file 2, Preview Expected result: Previewed successfully Actual result: NPE throws out when preview Error log:
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/olap/query/view/CubeQueryDefinitionUtil.java
import org.eclipse.birt.data.engine.olap.api.query.impl.LevelDefiniton;
import org.eclipse.birt.data.engine.olap.api.query.impl.MeasureDefinition;
import org.eclipse.birt.data.engine.olap.util.ICubeAggrDefn;
import org.eclipse.birt.data.engine.olap.util.OlapExpressionUtil;
/**
 * Utility class
 *
 */
class CubeQueryDefinitionUtil
{
	/**
	 * Populate all aggregation member in CubeQueryDefinition. For initial
	 * implementation: we only consider IMeasureDefintion we will take into
	 * consider to handle the aggregation definition in binding expression;
	 * 
	 * @param queryDefn
	 * @return
	 */
	static CalculatedMember[] getCalculatedMembers(
			ICubeQueryDefinition queryDefn )
	{
		List measureList = queryDefn.getMeasures( );
		ICubeAggrDefn[] cubeAggrs = OlapExpressionUtil.getAggrDefns( queryDefn.getBindings( ) );
		
		List cubeAggrBindingList = new ArrayList();
		for( int i=0; i< cubeAggrs.length; i++ )
		{
			if( cubeAggrs[i].aggrName( ) != null )
				cubeAggrBindingList.add( cubeAggrs[i] );
		}