ScalarParameterDefn parameterObj = ( ScalarParameterDefn )iter.next( );
IScalarParameterDefn parameterObj = (IScalarParameterDefn) iter .next( );
	private Map getParsedParameters( IViewerReportDesignHandle design,			InputOptions options, Map parameters )			throws ReportServiceException	{		Locale locale = ( Locale ) options.getOption( InputOptions.OPT_LOCALE );		Collection parameterList = getParameterDefinitions( design, options );		Map paramMap = new HashMap( );		IGetParameterDefinitionTask task = null;		Map configMap = null;		Boolean isDesignerBoolean = ( Boolean ) options				.getOption( InputOptions.OPT_IS_DESIGNER );		boolean isDesigner = ( isDesignerBoolean != null ? isDesignerBoolean				.booleanValue( ) : false );		try		{			task = getParameterDefinitionTask( design.getFileName( ) );			IReportRunnable runnable = ReportEngineService.getInstance( )					.openReportDesign( design.getFileName( ) );			configMap = runnable.getTestConfig( );		}		catch ( EngineException e )		{			throw new ReportServiceException( e.getLocalizedMessage( ) );		}		for ( Iterator iter = parameterList.iterator( ); iter.hasNext( ); )		{			ScalarParameterDefn parameterObj = ( ScalarParameterDefn )iter.next( );						String paramValue = null;			Object paramValueObj = null;			ScalarParameterHandle paramHandle = ( ScalarParameterHandle ) parameterObj					.getHandle( );			String paramName = paramHandle.getName( );			String format = paramHandle.getPattern( );			ReportParameterConverter converter = new ReportParameterConverter(					format, locale );			Set paramNames = parameters.keySet( );			if ( parameters != null && paramName != null )			{				boolean found = false;				for ( Iterator it = paramNames.iterator( ); it.hasNext( ); )				{					String name = ( String ) it.next( );					if ( paramName.equals( name ) )					{						paramValue = ( String ) parameters.get( name );						paramValueObj = converter.parse( paramValue,								ParameterDataTypeConverter										.getEngineDataType( paramHandle												.getDataType( ) ) );						paramMap.put( paramName, paramValueObj );						found = true;						break;					}				}				if ( !found && configMap.containsKey( paramName ) && isDesigner )				{					// Get value from test config					String configValue = ( String ) configMap.get( paramName );					ReportParameterConverter cfgConverter = new ReportParameterConverter(							format, Locale.US );					paramValueObj = cfgConverter.parse( configValue,							parameterObj.getDataType( ) );				} else if ( !found )				{					// Get default value from task					paramValueObj = task.getDefaultValue( parameterObj							.getName( ) );				}			}		}		return paramMap;	}