context.addException( new EngineException( "Failed to render Data " + ( item.getName( ) != null ? item.getName( ) : "" ),
context.addException( new EngineException( MessageConstants.TEXT_PROCESSING_ERROR, ( item.getName( ) != null ? item.getName( ) : "" ),
	public void execute( ReportItemDesign item, IReportEmitter emitter )	{		DataItemDesign dataItem = (DataItemDesign) item;		IReportItemEmitter textEmitter = emitter.getEmitter( "text" ); //$NON-NLS-1$		/*		 * Getting item emitter returns null means that excuting this item is		 * not necessary. for example, items in masterpage for html emitter will		 * be discarded.		 */		if ( textEmitter == null )		{			return;		}		TextItemContent textObj = (TextItemContent) ContentFactory				.createTextContent( dataItem, context.getContentObject( ) );		IResultSet rs = null;		try		{			rs = openResultSet( item );			if ( rs != null )			{				rs.next( );			}			Object value = context.evaluate( dataItem.getValue( ) );			//get the mapping value			value = getMapVal( value, dataItem );			textObj.setHelpText( getLocalizedString(					dataItem.getHelpTextKey( ), dataItem.getHelpText( ) ) );			setStyles( textObj, item );			StringBuffer formattedString = new StringBuffer( );			formatValue( value, null, dataItem.getStyle( ), formattedString ,textObj);			textObj.setValue( formattedString.toString( ) );			if ( value != null )			{				if ( value instanceof Number )				{					String numberAlign = ( (StyleDesign) textObj							.getMergedStyle( ) ).getNumberAlign( );					if ( numberAlign != null )					{						// set number alignment						textObj.setStyleProperty( Style.TEXT_ALIGN_PROP,								numberAlign );					}				}			}			setVisibility( item, textObj );			processAction( dataItem.getAction( ), textObj );			String bookmarkStr = evalBookmark( item );			if ( bookmarkStr != null )				textObj.setBookmarkValue( bookmarkStr );			//pass the text content instance to emitter			textEmitter.start( textObj );			textEmitter.end( );		}		catch(Throwable t)		{			logger.log( Level.SEVERE, "Error:", t);//$NON-NLS-1$			context.addException( new EngineException( "Failed to render Data "					+ ( item.getName( ) != null ? item.getName( ) : "" ),					t ) );//$NON-NLS-1$		}		finally		{			closeResultSet( rs );		}	}