Bug 168177 [2.1.2][regression]DataException when preview attached report in Web Viewer.[0901]
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/ServiceForQueryResults.java
public IBaseQueryDefinition getQueryDefn( )
	{
		return queryDefn;
	}
	/*
	 * @see org.eclipse.birt.data.engine.impl.IQueryService#getPreparedQuery()
	 */
	public IPreparedQuery getPreparedQuery( )
	{
		return this.reportQuery;
	}
	
	/*
	 * @see org.eclipse.birt.data.engine.impl.IQueryService#getGroupLevel()
	 */
	public int getGroupLevel( )
	{
		if ( queryService instanceof PreparedSubquery )
		{
			PreparedSubquery subQuery = (PreparedSubquery) queryService;
			return subQuery.getGroupLevel( );
		}
		else if ( queryService instanceof PreparedIVSubQuery )
		{
			PreparedIVSubQuery subQuery = (PreparedIVSubQuery) queryService;
			return subQuery.getGroupLevel( );
		}
		else
		{
			return 0;