Bug 124610 Add a filter on a boolean computed column will cause error.
Description: Add a filter on a boolean computed column will cause error. Steps to reproduce: 1. New a BIRT sample data source and a dataset from table "orders" 2. Create a computed column with name="yes/no", type = any(no boolean for choose), value= if(row[1]%2==0){ true; }else{ false; } 3. Drag the dataset from Data Explorer to Layout 4. Select the table, click Filters tab in Property Editor. 5. Click Add button. 6. Select yes/no as Expression, Is True as Operator. 7. Save and preview. Expected result: Filter works. Actual result: Error0 : data.engine.ConvertToDataTypeError ( 1 time(s) ) detail : org.eclipse.birt.data.engine.core.DataException: can not be converted to class java.lang.Boolean.
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/script/ScriptEvalUtil.java
import org.eclipse.birt.data.engine.impl.LogUtil;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.Scriptable;
/**
 * Static utility methods to help evaluating Javascript expressions 
 */
public class ScriptEvalUtil
{	
	private static Logger logger = Logger.getLogger( ScriptEvalUtil.class.getName( ) );
	
	/**
	 * @param exprText
	 * @param value
	 * @return an instance of ExprTextAndValue
	 */
	public static ExprTextAndValue newExprInfo( String exprText, Object value )
	{
		return ExprTextAndValue.newInstance( exprText, value );
	}
	
	/**
	 * Evaluates a conditional expression. A conditional expression comprises of
	 * a Javascript expression, an operator, and up to 2 operands (which are
	 * Javascript expressions themselves).<br>
	 * Both op1 and op2 will be encapsulated to ExprTextAndValue type to show
	 * specific message in case anything goes wrong, they are assumed not to be
	 * null as well.
	 * <p>
	 * The basic rule for comparison: obj will always be considered as the
	 * default data type,i.e. obj, op1 and op2 will be formatted to the superset