numberFormat = style.getNumberFormatObject( );  if ( numberFormat == null ) {  formatStr = getNumberFormat(reportContent);
formatStr = style.getNumberFormat( ); }
	protected void formatValue( Object value, String formatStr,			StyleDesign style, StringBuffer formattedStr,ReportElementContent reportContent )	{		if ( value == null )		{			return;		}		assert style != null && formattedStr != null;		if ( ( value instanceof Number ) )		{			NumberFormatter numberFormat = null;			if ( formatStr == null || formatStr.length( ) == 0 )			{				numberFormat = style.getNumberFormatObject( );				//initial number-format for the first time				if ( numberFormat == null )				{//					formatStr = style.getNumberFormat( );					formatStr = getNumberFormat(reportContent);					if ( formatStr != null && formatStr.length( ) != 0)					{						numberFormat = new NumberFormatter( formatStr, context.getLocale( ) );						style.setNumberFormatObject( numberFormat );					}				}			}			else			//deal with value-of for text item			{				numberFormat = new NumberFormatter( formatStr, context.getLocale( ) );			}						if (numberFormat == null)			{				numberFormat = new NumberFormatter( context.getLocale( ) );			}						formattedStr.append( numberFormat.format( ( (Number) value )					.doubleValue( ) ) );			return;		}		else if ( value instanceof Date )		{			DateFormatter dateFormat = null;			if ( formatStr == null || formatStr.length( ) == 0 )			{				dateFormat = style.getDateFormatObject( );				//initial date-format for the first time				if ( dateFormat == null )				{//					formatStr = style.getDateTimeFormat( );					formatStr = getDateTimeFormat( reportContent );					if ( formatStr != null && formatStr.length( ) != 0)					{						dateFormat = new DateFormatter( formatStr, context.getLocale( ) );						style.setDateFormatObject( dateFormat );					}				}			}			else			//deal with value-of for text item			{				dateFormat = new DateFormatter( formatStr, context.getLocale( ) );			}			if( dateFormat == null )			{				dateFormat = new DateFormatter( context.getLocale( ) );			}						formattedStr.append( dateFormat.format( (Date) value ) );			return;		}		else if ( value instanceof String )		{			StringFormatter stringFormat = null;			if ( formatStr == null || formatStr.length( ) == 0 )			{				stringFormat = style.getStringFormatObject( );				 				//initial string-format for the first time				if ( stringFormat == null )				{					//get format pattern from style//					formatStr = style.getStringFormat( );					formatStr = getStringFormat( reportContent );					if ( formatStr != null && formatStr.length( ) != 0)					{						//use default stringFormat						stringFormat = new StringFormatter( formatStr, context.getLocale( ) );						style.setStringFormatObject( stringFormat );					}				}			}			else			//deal with value-of for text item			{				stringFormat = new StringFormatter( formatStr, context.getLocale( ) );			}			if( stringFormat != null )			{				formattedStr.append( stringFormat.format( value.toString( ) ) );				return;			}		}		formattedStr.append( value.toString( ) );	}