Bug 180405 The grand total's result is incorrect[1102]
Description: The grand total's result is incorrect[1102] Build number: 2.2.0.v20070402-0630 Steps to reproduce: 1, Using the attached design file 2, Preview the results and check the grand total of QUANTITY_PRODUCT Expected result: 42, 7, 13, 5 Actual result: Only calculate the latest row of QUANTITY Error log:
data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/DataSetIterator.java
else if ( function.equals( "max" ) )
		{
			se = new ScriptExpression( "Total.max("
					+ measure.getMeasureExpression( ) + ",null,"
					+ query.getGroups( ).size( ) + ")" );
		}
		se.setDataType( ModelAdapter.adaptModelDataType( measure.getDataType( ) ) );
		return se;
	}
	/**
	 * 
	 * @param query
	 * @param resultMetaList
	 * @param levelNameColumnNamePair
	 * @param hierHandle
	 * @throws AdapterException 
	 */
	private void prepareLevels( QueryDefinition query,
			TabularHierarchyHandle hierHandle, List metaList,
			String timeLevelName, String leafLevelName )
			throws AdapterException
	{
		
		List levels = hierHandle.getContents( TabularHierarchyHandle.LEVELS_PROP );
		for ( int j = 0; j < levels.size( ); j++ )
		{
			TabularLevelHandle level = (TabularLevelHandle) levels.get( j );
			ColumnMeta temp = null;
			int type = ModelAdapter.adaptModelDataType(level.getDataType( ));
			if ( isTimeType( type ))