Bug 168026 Still use the existing data binding even though the aggregate is different
I had a table in which a data binding which aggregates on a group. When I insert a new data item in the report, although the expressions are same, it aggregates on All, then it refered to the existing data binding. The expected behavior would be a new data binding is created with different aggregates.
model/org.eclipse.birt.report.model.tests/test/org/eclipse/birt/report/model/api/ReportItemHandleTest.java
list.setDataSet( handle );
		assertEquals( handle, list.getDataSet( ) );
		list.setDataSet( (DataSetHandle) null );
		assertNull( list.getDataSet( ) );
	}
	/**
	 * Tests 'addTOC' , 'getTOC' , 'setExpression' , 'getExpression' method.
	 * 
	 * @throws Exception
	 */
	public void testTOC( ) throws Exception
	{
		LabelHandle labelHandle = (LabelHandle)designHandle.findElement( "bodyLabel" );
		
		TOC toc = StructureFactory.createTOC( "toc" ); 
		TOCHandle tocHandle = labelHandle.addTOC( toc );
		assertNotNull( tocHandle );
		assertEquals( "toc" , tocHandle.getExpression( ) );
		
		
		
		tocHandle.setProperty( DesignChoiceConstants.CHOICE_FONT_WEIGHT , DesignChoiceConstants.FONT_WEIGHT_BOLD );
		
		
		
		StyleHandle style = designHandle.getElementFactory( ).newStyle( "style" );	
		style.setCanShrink( true );
		style.setFontWeight( DesignChoiceConstants.FONT_WEIGHT_NORMAL );
		designHandle.getStyles( ).add( style );