catch ( BirtException ex )
if ( output != null )
	public void execute( ReportItemDesign item, IReportEmitter emitter )	{		assert item instanceof ExtendedItemDesign;		IExtendedItemContent content = ContentFactory				.createExtendedItemContent( (ExtendedItemDesign) item , context.getContentObject( ));				// handle common properties, such as		//		//1) style (Not supported now as we only support image extension)		//2) highlight (Not supported now as we only support image extension)		//3) x,y		//4) actions		//		// other report item-supported features.		//create user-defined generation-time helper object		ExtendedItemHandle handle = (ExtendedItemHandle) item.getHandle( );		String tagName = handle.getExtensionName( );		IReportItemGeneration itemGeneration = ExtensionManager.getInstance( )				.createGenerationItem( tagName );		byte[] generationStatus = null;		if ( itemGeneration != null )		{			itemGeneration.setModelObject( handle );			itemGeneration.setReportQueries(((ExtendedItemDesign)item).getQueries());			IRowSet[] rowSets = executeQueries( item );			if ( rowSets != null )			{				try				{					itemGeneration.onRowSets( rowSets );				}				catch ( BirtException ex )				{					logger.log( Level.SEVERE, ex.getMessage( ), ex );				}			}			if ( itemGeneration.needSerialization( ) )			{				try				{					ByteArrayOutputStream out = new ByteArrayOutputStream( );					itemGeneration.serialize( out );					generationStatus = out.toByteArray( );				}				catch ( BirtException ex )				{					logger.log( Level.SEVERE, ex.getMessage( ), ex );				}			}			closeQueries( rowSets );			itemGeneration.finish( );		}		//call the presentation peer to create the content object		IReportItemPresentation itemPresentation = ExtensionManager				.getInstance( ).createPresentationItem( tagName );		if ( itemPresentation != null )		{			itemPresentation.setModelObject( handle );			itemPresentation.setReportQueries(((ExtendedItemDesign)item).getQueries());			//itemPresentation.setResolution();			itemPresentation.setLocale(context.getLocale());			itemPresentation.setSupportedImageFormats( "GIF;PNG;JPG;BMP" );			itemPresentation.setOutputFormat( emitter.getOutputFormat( ) );			if ( generationStatus != null )			{				itemPresentation.deserialize( new ByteArrayInputStream(						generationStatus ) );			}			Object output = null;			IRowSet[] rowSets = executeQueries( item );			if ( rowSets != null )			{				try				{					output = itemPresentation.onRowSets( rowSets );				}				catch ( BirtException ex )				{					logger.log( Level.SEVERE, ex.getMessage( ), ex );				}			}			if (output != null)			{				int type = itemPresentation.getOutputType( );				handleItemContent( item, emitter, content, type, output );			}			closeQueries( rowSets );			itemPresentation.finish( );		}	}