|| format.equalsIgnoreCase( "fop" ) || ((format.equalsIgnoreCase( "pdf" )) && ! "org.eclipse.birt.report.engine.pdf".equals(emitterID)))
|| format.equalsIgnoreCase( "fop" ))
	public void run( ) throws EngineException	{		// Make a deep copy of the design element and recreate the IReportRunnable		ReportDesignHandle designHandle = (ReportDesignHandle) runnable				.getDesignHandle( );			ReportDesign copiedReportDesign = (ReportDesign)designHandle.copy();		ReportDesignHandle copiedDesignHandle = (ReportDesignHandle)copiedReportDesign.getHandle( null ); // null will create a new report design handle		runnable = new ReportRunnable( copiedDesignHandle );		if ( !validateParameters( ) )		{			throw new EngineException(					MessageConstants.INVALID_PARAMETER_EXCEPTION ); //$NON-NLS-1$		}		// create the emitter services object that is needed in the emitters.		EngineEmitterServices services = new EngineEmitterServices( this );		services.setRenderOption( renderOption );		EngineConfig config = engine.getConfig( );		if ( config != null )			services					.setEmitterConfig( engine.getConfig( ).getEmitterConfigs( ) );		services.setRenderContext( context );		services.setReportRunnable( runnable );		// register default parameters		usingParameterValues( );		//		 Set up rendering environment and check for supported format		executionContext.setRenderOption( renderOption );		String format = renderOption.getOutputFormat( );		if ( format == null || format.length( ) == 0 ) // $NON-NLS-1		{			renderOption.setOutputFormat( "html" ); // $NON-NLS-1			format = "html"; // $NON-NLS-1		}		else if ( renderOption != null && format.equalsIgnoreCase( "fo" ) // $NON-NLS-1				&& ( (FORenderOption) renderOption ).getTailoredForFOP( ) )		{			format = "fop"; // $NON-NLS-1		}		// 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.getLocale(), 				format );		executionContext.setReportContext( reportContext );		// Call onPrepare in the design tree		ScriptedDesignVisitor visitor = new ScriptedDesignVisitor(				copiedDesignHandle, executionContext );		visitor.apply( copiedDesignHandle.getRoot( ) );		// setup runtime configurations		// user defined configs are overload using system properties.		executionContext.getConfigs( ).putAll( runnable.getTestConfig( ) );		executionContext.getConfigs( ).putAll( System.getProperties( ) );		if (format.equalsIgnoreCase("html"))		{			HTMLEmitterConfig tmp = (HTMLEmitterConfig) config.getEmitterConfigs().get("html");			if (tmp != null)				executionContext.setActionHandler(tmp.getActionHandler());		}				if ( !ExtensionManager.getInstance( ).getSupportedFormat()				.contains( 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 );		// if we need do the paginate, do the paginate.		if ( format.equalsIgnoreCase( "html" ) )		{			emitter = new HTMLPaginationEmitter( executor, emitter );		}		else if ( format.equalsIgnoreCase( "fo" )				|| format.equalsIgnoreCase( "fop" )				|| ((format.equalsIgnoreCase( "pdf" )) && ! "org.eclipse.birt.report.engine.pdf".equals(emitterID)))		{			emitter = new DefaultPaginationEmitter( executor, emitter );		}				// emitter is not null		emitter.initialize( services );		try		{			Report report = new ReportParser( )					.parse( ( (ReportRunnable) runnable ).getReport( ) );			executor.execute( report, emitter );		}		catch ( Exception ex )		{			log.log( Level.SEVERE,					"An error happened while running the report. Cause:", ex ); //$NON-NLS-1$			throw new EngineException(					"Error happened while running the report", ex );		}		catch ( OutOfMemoryError err )		{			log.log( Level.SEVERE,					"An OutOfMemory error happened while running the report." ); //$NON-NLS-1$			throw err;		}		catch ( Throwable t )		{			log.log( Level.SEVERE,					"Error happened while running the report.", t ); //$NON-NLS-1$			new EngineException( "Error happened while running the report", t );		}	}