if ( !ExtensionManager.getInstance( ).getEmitterExtensions( ) .containsKey( format ) )
if ( !ExtensionManager.getInstance( ).getSupportedFormat() .contains( format ) )
	protected void doRender( long pageNumber ) throws EngineException	{		// create the emitter services object that is needed in the emitters.		EngineEmitterServices services = new EngineEmitterServices( this );		services.setRenderOption( renderOptions );		EngineConfig config = engine.getConfig( );		if ( config != null )			services					.setEmitterConfig( engine.getConfig( ).getEmitterConfigs( ) );		services.setRenderContext( context );		services.setReportRunnable( runnable );		// register default parameters		usingParameterValues( );		// After setting up the parameter values and before executing the		// report, we need to call onPrepare on all items.		// Create IReportContext and set it to execution context		ReportContextImpl reportContext = new ReportContextImpl(				executionContext.getParams( ), config.getConfigMap( ),				executionContext.getAppContext( ) );		executionContext.setReportContext( reportContext );		// setup runtime configurations		// user defined configs are overload using system properties.		executionContext.getConfigs( ).putAll( runnable.getTestConfig( ) );		executionContext.getConfigs( ).putAll( System.getProperties( ) );		// Set up rendering environment and check for supported format		executionContext.setRenderOption( renderOptions );		String format = renderOptions.getOutputFormat( );		if ( format == null || format.length( ) == 0 ) // $NON-NLS-1		{			renderOptions.setOutputFormat( "html" ); // $NON-NLS-1			format = "html"; // $NON-NLS-1		}		else if ( renderOptions != null && format.equalsIgnoreCase( "fo" ) // $NON-NLS-1				&& ( (FORenderOption) renderOptions ).getTailoredForFOP( ) )		{			format = "fop"; // $NON-NLS-1		}		if ( !ExtensionManager.getInstance( ).getEmitterExtensions( )				.containsKey( format ) )		{			log.log( Level.SEVERE,					MessageConstants.FORMAT_NOT_SUPPORTED_EXCEPTION, format );			throw new EngineException(					MessageConstants.FORMAT_NOT_SUPPORTED_EXCEPTION, format );		}		IContentEmitter emitter = ExtensionManager.getInstance( )				.createEmitter( format, emitterID );		if ( emitter == null )		{			log.log( Level.SEVERE, "Report engine can not create {0} emitter.",					format ); // $NON-NLS-1$			throw new EngineException(					MessageConstants.CANNOT_CREATE_EMITTER_EXCEPTION );		}		ReportExecutor executor = new ReportExecutor( executionContext );		services.setExecutor( executor );		// localized emitter		emitter = new LocalizedEmitter( executionContext, emitter );		// emitter is not null		emitter.initialize( services );		try		{			ReportContentLoader loader = new ReportContentLoader(					executionContext );			loader.loadPage( pageNumber, emitter );		}		catch ( Exception ex )		{			log.log( Level.SEVERE,					"An error happened while running the report. Cause:", ex ); //$NON-NLS-1$		}		catch ( OutOfMemoryError err )		{			log.log( Level.SEVERE,					"An OutOfMemory error happened while running the report." ); //$NON-NLS-1$			throw err;		}	}