Bug 180408 After correct the expression of dimension, NPE throws out and the x-tab can not be previewed anymore[1102]
Description: After correct the expression of level, NPE throws out and the x-tab can not be previewed anymore[1102] Build number: 2.2.0.v20070402-0630 Steps to reproduce: 1, New a cube with two report design 2, New a x-tab using the cube 3, Change the level's name to CUSTOMER_REGION1 4, Preview the report 5, Correct the expression in x-tab: dimension["Customer"]["CUSTOMER_REGION1"] 6, Preview the report Expected result: After step4, the report can not be previewed but not shown up the NPE message After step5 and 6, the report can be previewed successfully Actual result: After step4, NPE pops up After step6, NPE still pops up Error log:
data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/DataSetIterator.java
query.addResultSetExpression( meta.getName( ),
						new ScriptExpression( ExpressionUtil.createJSDataSetRowExpression( levelAttr.getName( ) ) ) );
				resultMetaList.add( meta );
			}
			GroupDefinition gd = new GroupDefinition( );
			gd.setKeyExpression( ExpressionUtil.createJSRowExpression( level.getName( ) ) );
			query.addResultSetExpression( level.getName( ),
					new ScriptExpression( ExpressionUtil.createJSDataSetRowExpression( level.getColumnName( ) ) ) );
			query.addGroup( gd );
		}
	}
	/*
	 * (non-Javadoc)
	 * @see org.eclipse.birt.data.engine.olap.api.cube.IDatasetIterator#close()
	 */
	public void close( ) throws BirtException
	{
		it.close( );
	}
	/*
	 * (non-Javadoc)
	 * @see org.eclipse.birt.data.engine.olap.api.cube.IDatasetIterator#getFieldIndex(java.lang.String)
	 */
	public int getFieldIndex( String name ) throws BirtException
	{
		if ( this.metadata == null )
		{
			for ( int i = 1; i <= it.getResultMetaData( ).getColumnCount( ); i++ )
			{
				if ( name.equals( it.getResultMetaData( ).getColumnName( i ) ) )