Bug 131011 Support running query based on report document data
Data Engine should support running a query based on data set and expression data stored in a report document. This bugzilla entry serves as a repository for design docs and notes related to this feature.
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/ResultIterator.java
logger.logp( Level.FINE,
					ResultIterator.class.getName( ),
					"getEndingGroupLevel",
					"return the ending group level" );
		return odiResult.getEndingGroupLevel( );
	}
	/*
	 * @see org.eclipse.birt.data.engine.api.IResultIterator#getSecondaryIterator(java.lang.String,
	 *      org.mozilla.javascript.Scriptable)
	 */
	public IResultIterator getSecondaryIterator( String subQueryName,
			Scriptable subScope ) throws DataException
	{
		checkStarted( );
		
		QueryResults results = rService.execSubquery( odiResult,
				subQueryName,
				subScope );
		logger.logp( Level.FINE,
				ResultIterator.class.getName( ),
				"getSecondaryIterator",
				"Returns the secondary result specified by a SubQuery" );
		IResultIterator resultIt = results.getResultIterator( );
		
		this.getRdSaveUtil( ).processForSubQuery( this.getQueryResults( )
				.getID( ),
				(ResultIterator) resultIt,
				subQueryName );
		
		return resultIt;