( (HTMLRenderOption) options ).setHtmlPagination( this.pagination );
	protected final void runAndRender( String input, String output,			Map paramValues, String format ) throws EngineException	{		String outputFile = this.getClassFolder( ) + "/" + OUTPUT_FOLDER //$NON-NLS-1$				+ "/" + output; //$NON-NLS-1$		String inputFile = this.getClassFolder( )				+ "/" + INPUT_FOLDER + "/" + input; //$NON-NLS-1$ //$NON-NLS-2$		IReportRunnable runnable = engine.openReportDesign( inputFile );		IRunAndRenderTask task = engine.createRunAndRenderTask( runnable );		if ( paramValues != null )		{			Iterator keys = paramValues.keySet( ).iterator( );			while ( keys.hasNext( ) )			{				String key = (String) keys.next( );				task.setParameterValue( key, paramValues.get( key ) );			}		}		task.setLocale( Locale.ENGLISH );		IRenderOption options = null;		if ( "pdf".equals( format ) ) //$NON-NLS-1$		{			options = new RenderOptionBase( );			options.setOutputFileName( outputFile );		}		else		{			options = new HTMLRenderOption( );			options.setOutputFileName( outputFile );			HTMLRenderContext renderContext = new HTMLRenderContext( );			renderContext.setImageDirectory( IMAGE_DIR );			HashMap appContext = new HashMap( );			appContext.put( EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT,					renderContext );			task.setAppContext( appContext );		}		options.setOutputFormat( format );		options.getOutputSetting( ).put( HTMLRenderOption.URL_ENCODING,				ENCODING_UTF8 );		( (HTMLRenderOption) options ).setHtmlPagination( this.pagination );		task.setRenderOption( options );		task.run( );		task.close( );	}