StringFormatter sf = new StringFormatter( locale );
StringFormatter sf = new StringFormatter( ULocale.forLocale(locale) );
	public Object parse( String reportParameterValue, int parameterValueType )	{		Object parameterValueObj = null;				if ( reportParameterValue != null && locale != null )		{			switch ( parameterValueType )			{				case IScalarParameterDefn.TYPE_STRING:				{					StringFormatter sf = new StringFormatter( locale );										if ( format != null )					{						sf.applyPattern( format );					}						try					{						parameterValueObj = sf.parser( reportParameterValue );					}					catch ( ParseException e )					{						parameterValueObj = reportParameterValue;					}					break;				}								case IScalarParameterDefn.TYPE_DATE_TIME:				{					DateFormatter df = new DateFormatter( locale );										if ( format != null )					{						df.applyPattern( format );					}						try					{						parameterValueObj = df.parse( reportParameterValue );					}					catch ( ParseException e )					{						df.applyPattern( "Short Date" );												try						{							parameterValueObj = df.parse( reportParameterValue );						}						catch ( ParseException ex )						{							df.applyPattern( "Medium Time" );														try							{								parameterValueObj = df.parse( reportParameterValue );							}							catch ( ParseException exx )							{								parameterValueObj = null;							}						}					}						break;				}					case IScalarParameterDefn.TYPE_FLOAT:				{					NumberFormatter nf = new NumberFormatter( locale );					if ( format != null )					{						nf.applyPattern( format );					}										try					{						Number num = nf.parse( reportParameterValue );							if ( num != null )						{							parameterValueObj = new Double( num.toString( ) );						}					}					catch ( ParseException e )					{						nf.applyPattern( "General Number" );												try						{							Number num = nf.parse( reportParameterValue );								if ( num != null )							{								parameterValueObj = new Double( num.toString( ) );							}						}						catch ( ParseException ex )						{							parameterValueObj = null;						}					}						break;				}								case IScalarParameterDefn.TYPE_DECIMAL:				{					NumberFormatter nf = new NumberFormatter( locale );											if ( format != null )					{						nf.applyPattern( format );					}					try					{						Number num = nf.parse( reportParameterValue );							if ( num != null )						{							parameterValueObj = new BigDecimal( num.toString( ) );						}					}					catch ( ParseException e )					{						nf.applyPattern( "General Number" );												try						{							Number num = nf.parse( reportParameterValue );								if ( num != null )							{								parameterValueObj = new BigDecimal( num.toString( ) );							}						}						catch ( ParseException ex )						{							parameterValueObj = null;						}					}						break;				}					case IScalarParameterDefn.TYPE_BOOLEAN:				{					parameterValueObj = Boolean.valueOf( reportParameterValue );					break;				}								//can use class DataTypeUtil to convert				case IScalarParameterDefn.TYPE_INTEGER:				{					NumberFormatter nf = new NumberFormatter( locale );										if ( format != null )					{						nf.applyPattern( format );					}										try					{						Number num = nf.parse( reportParameterValue );												if ( num != null )						{							parameterValueObj = new Integer( num.intValue( ) );						}					}					catch( ParseException ex )					{						nf.applyPattern( "General Number" );												try						{							Number num = nf.parse( reportParameterValue );														if ( num != null )							{								parameterValueObj = new Integer( num.intValue( ) );							}						}						catch( ParseException pex )						{							try							{								parameterValueObj = new Integer( reportParameterValue );							}							catch( NumberFormatException nfe )							{								parameterValueObj = null;							}						}					}				}			}		}				return parameterValueObj;	}