Bug 135778 There is an error when the data item has no binding data set
Data item can have no binding data set, if it happens, it indicates it only use the basic Java Script function such as new Date(). At this moment, the data of data item is not stored in report document by DtE, which only supports these data items which has binding data set.
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/PreparedDummyQuery.java
import org.eclipse.birt.data.engine.api.IPreparedQuery;
import org.eclipse.birt.data.engine.api.IQueryDefinition;
import org.eclipse.birt.data.engine.api.IQueryResults;
import org.eclipse.birt.data.engine.api.IResultIterator;
import org.eclipse.birt.data.engine.api.IResultMetaData;
import org.eclipse.birt.data.engine.core.DataException;
import org.eclipse.birt.data.engine.expression.ExprEvaluateUtil;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.Scriptable;
import org.mozilla.javascript.ScriptableObject;
/**
 * When there is no data set, this instance will be created.
 */
public class PreparedDummyQuery implements IPreparedQuery
{
	private IQueryDefinition queryDefn;
	private ExprManager exprManager;
	private Scriptable sharedScope;
	/**
	 * @param queryDefn
	 */
	PreparedDummyQuery( IQueryDefinition queryDefn, Scriptable sharedScope )
	{
		assert queryDefn != null;
		
		this.queryDefn = queryDefn;
		this.sharedScope = sharedScope;
		this.exprManager = new ExprManager( );
		this.exprManager.addExpr( queryDefn.getResultSetExpressions( ), 0 );
	}