Bug 209450 [regression]Duplicate values display in Cascading parameter list[0705]
Descripption: Duplicate values display in Cascading parameter list Build number:2.3.0.v20071112 Steps to reproduce: 1. New sample data source and dataset from CUSTOMERS. 2. New a cascading parameter from COUNTRY, STATE AND CITY fields. 3. Preview. Expected result: Values in three parameter list aren't duplicated. Actual result: Duplicate values show in parameter list. Error log:n/a
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/ParameterHelper.java
{
		String labelColumnName = getLabelColumnName( parameter );
		String valueColumnName = getValueColumnName( parameter );
		if ( labelColumnName != null )
		{
			addBinding( queryDefn, labelColumnName, parameter.getLabelExpr( ) );
		}
		addBinding( queryDefn, valueColumnName, parameter.getValueExpr( ) );
	}
	
	public static void addBinding( QueryDefinition queryDefinition,
			String columnName, String expression ) throws DataException
	{
		ScriptExpression labelScriptExpr = new ScriptExpression( expression );
		IBinding binding = new Binding( columnName, labelScriptExpr );
		queryDefinition.addBinding( binding );
	}
	
	private static Comparator createComparator(
			ScalarParameterHandle parameter, Locale locale, boolean distinct )
	{
		boolean sortDirectionValue = "asc".equalsIgnoreCase( parameter.getSortDirection( ) );
		boolean sortByLabel = "label".equalsIgnoreCase( parameter.getSortBy( ) );
		String pattern = parameter.getPattern( );
		SelectionChoiceComparator selectionChoiceComparator = new SelectionChoiceComparator(
				sortByLabel, pattern, sortDirectionValue, ULocale
						.forLocale( locale ) );
		return new DistinctComparatorDecorator(selectionChoiceComparator, distinct);
	}
	static class DistinctComparatorDecorator implements Comparator