Bug 212478 Exception occurs when preview the table including a Autotext
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/data/dte/ReportQueryBuilder.java
for ( int i = 0; i < queries.length; i++ )
			{
				IDataQueryDefinition referenceQuery = queries[i];
				if ( referenceQuery instanceof BaseQueryDefinition )
				{
					( (BaseQueryDefinition) referenceQuery )
							.setCacheQueryResults( true );
				}
				else if ( referenceQuery instanceof ICubeQueryDefinition )
				{
					( (ICubeQueryDefinition) referenceQuery )
							.setCacheQueryResults( true );
				}
				else
				{
					
					throw new IllegalStateException(
							"unsupported query, report item: "
									+ reportItem.getID( ) );
				}
			}
		}
	}
	/**
	 * The visitor class that actually builds the report query
	 */
	protected class QueryBuilderVisitor extends DefaultReportItemVisitorImpl
	{
		public Object visitTemplate( TemplateDesign template, Object value )
		{