Bug 123727 the 'Top N' and 'Buttom N' do not work
Description: the 'Top N' and 'Buttom N' do not work Steps to reproduce: 1. new a report 2. new a datasource and a dataset 3. creat a report parameter, 4. drag a chart to the layout, In chart dialogue, click the 'select data' tab and click the button 'filters'. 5. set two filters condition, one is used the 'Top N' function and the other used the report parameter. 6. save and preview Actual result: NO data are displayed. Expect result: The data displayed according to the 'Top N' and 'Input Parameters'
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/script/NEvaluator.java
{
			if ( TOP_INSTANCE.equalsIgnoreCase( instanceName ) )
				instance = new TopNEvaluator( );
			else if ( BOTTOM_INSTANCE.equalsIgnoreCase( instanceName ) )
				instance = new BottomNEvaluator( );
			else
				throw new IllegalArgumentException( );
		}
		return instance;
	}
	
	/**
	 * Evaluate the given value
	 * @param value
	 * @param n
	 * @return
	 * @throws DataException
	 */
	public boolean evaluate(Object value, Object n, boolean calculatePercent) throws DataException
	{
		if( N == -1)
		{
			try{
				if( calculatePercent )
				{
					double temp = Double.valueOf( n.toString() ).doubleValue()/100;
					if( temp > 1 || temp < 0)
						throw new DataException(ResourceConstants.INVALID_TOP_BOTTOM_PERCENT_ARGUMENT);
					
					N = (int)Math.round( temp*getRowCount() );