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
if ( file.exists( ) )
		{
			String paraName = paramHandle.getName( );
			ScalarParameterHandle parameterHandle = (ScalarParameterHandle) designModule.findParameter( paraName );
			paraName = paraName + "_" + parameterHandle.getID( );
			SessionHandle sessionHandle = new DesignEngine( null ).newSessionHandle( ULocale.US );
			ReportDesignHandle rdHandle = null;
			
			try
			{
				rdHandle = sessionHandle.openDesign( reportConfigName );
			}
			catch ( DesignFileException e )
			{
				return null;
			}
			
			if ( rdHandle != null )
			{
				List values = new ArrayList( );
				Iterator configVars = rdHandle.configVariablesIterator( );
				while ( configVars != null && configVars.hasNext( ) )
				{
					ConfigVariableHandle configVar = (ConfigVariableHandle) configVars.next( );
					if ( configVar != null )
					{
						String varName = prepareConfigVarName( configVar.getName( ) );
						Object varValue = configVar.getValue( );
						if ( varName == null || varValue == null )
						{