, selectedColumns, query.getRowExpressions() );
, selectedColumns, getScriptExpressions( query.getRowExpressions()) );
	public IExtractionResults extract( ) throws EngineException	{		if( instanceId == null ) 			return null;				if ( currentResult != null )			return currentResult;				assert executionContext.getDataEngine() != null;		DataEngine dataEngine = executionContext.getDataEngine().getDataEngine();				ReportItemDesign rptItem = (ReportItemDesign) report				.getReportItemByID( instanceId.getComponentID( ) );		assert rptItem != null;				IBaseQueryDefinition query = rptItem.getQuery();		validateSelectedColumns( query );						DataID dataId = instanceId.getDataID();		InstanceID instId = instanceId;		while( instId != null && dataId == null ){			instId = instId.getParentID( );			if( instId != null )			{				dataId = instId.getDataID();			}		}				if(dataId == null)			return null;				DataSetID dataSetId = dataId.getDataSetID( );		assert dataSetId != null;				String queryResultName = dataSetId.getDataSetName( );				if( resultMetaList == null )		{			resultMetaList = new ArrayList( );		}		else		{			resultMetaList.clear();		}				if ( queryResultName != null )		{			try			{				IQueryResults queryResults = dataEngine.getQueryResults( queryResultName );								assert queryResults.getResultIterator() != null;								currentResult = new ExtractionResults( queryResults.getResultIterator() 						, selectedColumns, query.getRowExpressions() );				resultMetaList.add( currentResult.getResultMetaData() );				return currentResult;							}			catch ( BirtException e )			{				e.printStackTrace();			}		}		else		{			DataSetID parentId = dataSetId.getParentID( );			assert parentId != null;			try			{				queryResultName = parentId.getDataSetName( );				DataSetID parId = parentId;				while( queryResultName == null && parId != null )				{					parId = parId.getParentID();					if( parId != null )						queryResultName = parId.getDataSetName();				}				assert queryResultName != null;								IQueryResults parentQueryResult = dataEngine						.getQueryResults( queryResultName );				assert parentQueryResult != null;								IResultIterator iter = parentQueryResult.getResultIterator( );				long rowid = dataSetId.getRowID( );								int i = 0;				while ( iter.next( ) && i++ < rowid ) 		;								IResultIterator subIter = iter.getSecondaryIterator( dataSetId						.getQueryName( ), executionContext.getScope( ) );								currentResult = new ExtractionResults( subIter, 						selectedColumns, query.getRowExpressions() );								resultMetaList.add( currentResult.getResultMetaData());				return currentResult;			}			catch( BirtException be )			{				be.printStackTrace( );			}		}				return null;	}