Bug 147977 Chart editor does not use container's column bindings
1) create data source 2) create data set: select * from customers 3) create table 4) bind country, customer name to table 5) group by country 6) create a binding for total_by_country which aggregates # of customers in each country. put a data element in group footer and bind to total_by_country 7) in group header put chart 8) in data tab specify inherit from container Result: You see columns for report data set created in step 2. Expected Result: Just 3 columns for the 3 bindings created in 4 and 6.
data/org.eclipse.birt.data.tests/test/org/eclipse/birt/data/engine/impl/rd/ViewingTest.java
SubqueryDefinition subqueryDefn = new SubqueryDefinition( "IAMTEST" );
		((GroupDefinition)qd.getGroups( ).get(0)).addSubquery( subqueryDefn );
		subRowExprName = new String[3];
		subRowExprName[0] = "sub1";
		subRowExprName[1] = "sub2";
		subRowExprName[2] = "sub3";
		ScriptExpression[] exprs = new ScriptExpression[3];
		exprs[0] = new ScriptExpression( "row.__rownum");
		exprs[1] = new ScriptExpression( "dataSetRow.AMOUNT");
		exprs[2] = new ScriptExpression( "dataSetRow.CITY");
		for( int i = 0; i < subRowExprName.length; i++ )
			subqueryDefn.addResultSetExpression(subRowExprName[i], exprs[i]);
		subqueryDefn.setApplyOnGroupFlag(true);
		IQueryResults qr = myPreDataEngine.prepare( qd ).execute( null );
		IResultIterator ri = qr.getResultIterator( );
		ri.moveTo( 0 );
		do
		{
			String abc = "";
			for ( int i = 0; i < rowExprName.length; i++ )
				abc += ri.getValue( rowExprName[i] ) + "  ";
			for ( int i = 0; i < totalExprName.length; i++ )
				abc += ri.getValue( totalExprName[i] ) + "  ";
			
			this.testPrintln( abc + ri.getRowId( ) );
			
			IResultIterator subRi = ri.getSecondaryIterator("IAMTEST", scope);
			while( subRi.next() )
			{
				abc = "          [" + subRi.getValue("sub1") + "]" + "["