rs.next( ); }
rs = openResultSet( item ); if ( rs != null ) { rs.next( ); } Object value = context.evaluate( dataItem.getValue( ) );  value = getMapVal( value, dataItem );
	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;		}		IResultSet rs = openResultSet( item );		if ( rs != null )		{			rs.next( );		}		Object value = context.evaluate( dataItem.getValue( ) );		//get the mapping value		value = getMapVal( value, dataItem );		TextItemContent textObj = (TextItemContent)ContentFactory.createTextContent( dataItem, context.getContentObject( ) );		textObj.setHelpText( getLocalizedString( dataItem.getHelpTextKey( ),				dataItem.getHelpText( ) ) );		setStyles( textObj, item );		StringBuffer formattedString = new StringBuffer( );		formatValue( value, null, dataItem.getStyle( ), formattedString );		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( );		closeResultSet( rs );	}