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
* @param subQueryName
		 * @throws DataException
		 */
		private void processForSubQuery( String parentQueryID,
				ResultIterator resultIt, String subQueryName )
				throws DataException
		{			
			if ( needsSaveToDoc( ) == false )
				return;
			
			QueryResults results = (QueryResults) resultIt.getQueryResults( );
			
			if ( getSubQueryID( ) == null )
				results.setID( parentQueryID );
			else
				results.setID( parentQueryID + "/" + this.getSubQueryID( ) );
			
			resultIt.rdSaveUtil = new RDSaveUtil( resultIt.context,
					resultIt.rService.getQueryDefn( ),
					resultIt.getQueryResults( ).getID( ),
					resultIt.odiResult,
					subQueryName,
					results.getGroupLevel( ),
					odiResult.getCurrentGroupIndex( results.getGroupLevel( ) ),
					odiResult.getGroupStartAndEndIndex( results.getGroupLevel( ) ) );
		}
		
		/**
		 * @return
		 */