Bug 208842 Issue of preview dataset including a computed column which refer to a report parameter[07]
Description: Issue of preview dataset including a computed column which refer to a report parameter[07] Build number: 2.3.0.v20071106-0800 Steps to reproduce: 1, New a string type report parameter with no default value 2, New a Dataset 3, New a computed column refer to report parameter(e.g params["p1"]) 4, Preview in dataset 5, Preview the report in layout and specify the value of parameter 6, Go back the dataset and preview the dataset Expected result: The computed column's value is the value specified when preview the report Actual result: Exception occurs when preview the dataset in step6 Error log: org.eclipse.birt.data.engine.core.DataException: An error happen during population of data. This might be caused by including data of mixed type in a column of "ANY" type. Invalid data type. at org.eclipse.birt.data.engine.impl.ComputedColumnHelperInstance.process(ComputedColumnHelper.java:412) at org.eclipse.birt.data.engine.impl.ComputedColumnHelper.process(ComputedColumnHelper.java:108) at org.eclipse.birt.data.engine.executor.cache.RowResultSet.processFetchEvent(RowResultSet.java:134) at org.eclipse.birt.data.engine.executor.cache.RowResultSet.next(RowResultSet.java:98) at org.eclipse.birt.data.engine.executor.cache.ExpandableRowResultSet.next(ExpandableRowResultSet.java:64) at org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.populateData(SmartCacheHelper.java:299) at org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.initInstance(SmartCacheHelper.java:271) at org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.initOdaResult(SmartCacheHelper.java:155) at org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.getResultSetCache(SmartCacheHelper.java:79) at org.eclipse.birt.data.engine.executor.cache.SmartCache.<init>(SmartCache.java:56)
data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/script/DataAdapterTopLevelScope.java
typeNum = DataType.DECIMAL_TYPE;
		else if ( DesignChoiceConstants.PARAM_TYPE_DATETIME.equals( type ) )
			typeNum = DataType.DATE_TYPE;
		else if ( DesignChoiceConstants.PARAM_TYPE_BOOLEAN.equals( type ) )
			typeNum = DataType.BOOLEAN_TYPE;
		else if ( DesignChoiceConstants.PARAM_TYPE_INTEGER.equals( type ) )
			typeNum = DataType.INTEGER_TYPE;
		try
		{
			return DataTypeUtil.convert( defaultValue, typeNum );
		}
		catch ( BirtException e )
		{
			return null;
		}
	}
	
	/**
	 * Get the parameter value from .rptconfig file if it does exist
	 * 
	 * @return Object[] the parameter value
	 */
	private Object[] getParamValue( ScalarParameterHandle paramHandle )
	{
		String designFileName = designModule.getFileName( );
		
		String reportConfigName = designFileName.substring( 0,
				designFileName.length( ) - "rptdesign".length( ) )
				+ "rptconfig";
		File file = new File( reportConfigName );