dataIter = getResultSet( dataEngine, dataSetId, scope );
if(null == filterExpressions) { dataIter = getResultSetIterator( dataEngine, dataSetId, scope ); } else {   long id = iid.getComponentID( ); ReportItemDesign design = (ReportItemDesign) report.getReportItemByID( id ); query = design.getQuery( ); if ( null == query ) { return null; }   for(int iNum = 0; iNum < filterExpressions.length; iNum++) { query.getFilters( ).add( filterExpressions[ iNum ] ); }   IBaseQueryDefinition rootQuery = query; while( rootQuery instanceof SubqueryDefinition) { rootQuery = rootQuery.getParentQuery( ); } QueryDefinition newRootQuery = queryCopy( (QueryDefinition)rootQuery );   HashMap queryIds = report.getQueryIDs( ); String queryId = (String) queryIds.get( rootQuery ); String rsetId =  queryId2rsetId( queryId ); newRootQuery.setQueryResultsID( rsetId ); IPreparedQuery preparedQuery = dataEngine.prepare( newRootQuery); IQueryResults rootResults = preparedQuery.execute( scope );  dataIter = getFilterResultSetIterator( dataEngine, dataSetId, scope, rootResults ); }
	private IExtractionResults extractByInstanceID( InstanceID iid )			throws EngineException	{		DataID dataId = iid.getDataID( );		DataSetID dataSetId = dataId.getDataSetID( );		DataEngine dataEngine = executionContext.getDataEngine( )				.getDataEngine( );		Scriptable scope = executionContext.getSharedScope( );		IResultIterator dataIter = null;		try		{			dataIter = getResultSet( dataEngine, dataSetId, scope );		}		catch ( BirtException e )		{			// TODO Auto-generated catch block			e.printStackTrace( );			throw new EngineException( "Export date by Instance Id failed!", e );		}		IResultMetaData metaData = getMetaDateByInstanceID( iid );		if ( null != metaData )		{			return new ExtractionResults( dataIter,					metaData,					this.selectedColumns );		}		else		{			return null;		}	}