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/document/RDSave.java
{
			VersionManager.setVersion( context, VersionManager.VERSION_2_1 );
			
			rowOs = context.getOutputStream( queryResultID,
					subQueryID,
					DataEngineContext.EXPR_VALUE_STREAM );
			rowDos = new DataOutputStream( rowOs );
			lenOs = context.getOutputStream( queryResultID,
					subQueryID,
					DataEngineContext.ROWLENGTH_INFO_STREAM );
			lenDos = new DataOutputStream( lenOs );
			
			try
			{
				int totalRowCount = 0;
				if ( finish == true )
					totalRowCount = rowCount;
				else
					totalRowCount = rowCount == 0 ? 1 : rowCount;
				
				
				IOUtil.writeInt( rowDos, totalRowCount );
			}
			catch ( IOException e )
			{
				throw new DataException( ResourceConstants.RD_SAVE_ERROR, e );
			}
		}
	}