Bug 189812 Exceptions occurs when specify two sorting conditions on a crosstab[1102]
Description: Exceptions occurs when specify two sorting conditions on a crosstab[1102] Build number: 2.2.0.v20070530-0630 Steps to reproduce: 1, Open the attached report design 2, Specify the sorting on the crosstab 3, One sorting is : Group Level: Product/PRODUCTLINE Key: CREDITLIMIT_Date/year_Product/PRODUCTLINE Column member valud: year 2003 4, The second sorting is as same as sorting one, but the year value is 2004 Expected result: Support multi sorting on one condition Actual result: Exception occurs Error Logs: org.eclipse.birt.report.service.api.ReportServiceException: Error happened while running the report; nested exception is: java.lang.ArrayIndexOutOfBoundsException: 1 Show Exception Stack Trace Hide Exception Stack Trace Stack Trace: org.eclipse.birt.data.engine.olap.data.impl.aggregation.sort.AggregationSortHelper.createMatchedAggrRow(AggregationSortHelper.java:131) org.eclipse.birt.data.engine.olap.data.impl.aggregation.sort.AggregationSortHelper.populateAggrDiskArray(AggregationSortHelper.java:87) org.eclipse.birt.data.engine.olap.data.impl.aggregation.sort.AggregationSortHelper.sort(AggregationSortHelper.java:53) org.eclipse.birt.data.engine.olap.data.impl.aggregation.sort.AggrSortHelper.sort(AggrSortHelper.java:114) org.eclipse.birt.data.engine.olap.data.api.CubeQueryExecutorHelper.applyAggrSort(CubeQueryExecutorHelper.java:448) org.eclipse.birt.data.engine.olap.data.api.CubeQueryExecutorHelper.execute(CubeQueryExecutorHelper.java:301) org.eclipse.birt.data.engine.olap.query.view.QueryExecutor.populateRs(QueryExecutor.java:129) org.eclipse.birt.data.engine.olap.query.view.QueryExecutor.execute
data/org.eclipse.birt.data.tests/test/org/eclipse/birt/data/engine/olap/api/CubeFeaturesTest.java
cqd.addBinding( binding7 );
		
		IBinding binding8 = new Binding( "grandTotal");
		binding8.setExpression( new ScriptExpression("measure[\"measure1\"]") );
		binding8.setAggrFunction( IBuildInAggregation.TOTAL_SUM_FUNC );
		cqd.addBinding( binding8 );
		
		IBinding binding9 = new Binding( "country_year_total");
		binding9.setExpression( new ScriptExpression("measure[\"measure1\"]") );
		binding9.setAggrFunction( IBuildInAggregation.TOTAL_SUM_FUNC );
		binding9.addAggregateOn( "dimension[\"dimension1\"][\"level11\"]" );
		binding9.addAggregateOn( "dimension[\"dimension2\"][\"level21\"]" );
		cqd.addBinding( binding9 );
		
		IBinding binding10= new Binding( "city_year_total");
		binding10.setExpression( new ScriptExpression("measure[\"measure1\"]") );
		binding10.setAggrFunction( IBuildInAggregation.TOTAL_SUM_FUNC );
		binding10.addAggregateOn( "dimension[\"dimension1\"][\"level11\"]" );
		binding10.addAggregateOn( "dimension[\"dimension1\"][\"level12\"]" );
		binding10.addAggregateOn( "dimension[\"dimension2\"][\"level21\"]" );
		cqd.addBinding( binding10 );
		
		IBinding binding11= new Binding( "dist_total");
		binding11.setExpression( new ScriptExpression("measure[\"measure1\"]") );
		binding11.setAggrFunction( IBuildInAggregation.TOTAL_SUM_FUNC );
		binding11.addAggregateOn( "dimension[\"dimension1\"][\"level11\"]" );
		binding11.addAggregateOn( "dimension[\"dimension1\"][\"level12\"]" );
		binding11.addAggregateOn( "dimension[\"dimension1\"][\"level13\"]" );
		
		cqd.addBinding( binding11 );