((HTMLRenderOption)options).setHtmlPagination( true );
	protected int runAndRenderReport( )	{		try		{			// parse the source to get the report runnable			IReportRunnable runnable = engine.openReportDesign( source );			// validate the input paramter values			HashMap inputValues = evaluateParameterValues( runnable );			//			IRunAndRenderTask task = engine.createRunAndRenderTask( runnable );			task.setParameterValues( inputValues );			// set report render options			IRenderOption options;			if ( format.equalsIgnoreCase( "html" ) )			{				options = new HTMLRenderOption( );				if ( "ReportletNoCSS".equals( htmlType ) )					( (HTMLRenderOption) options ).setEmbeddable( true );			}			else			{				options = new RenderOptionBase();			}			options.setOutputFormat( format );			// setup the output file			options.setOutputFileName( targetFile );			// setup the output encoding			options.getOutputSetting( ).put( HTMLRenderOption.URL_ENCODING,					encoding );			// set the render options			task.setRenderOption( options );			// setup the application context			if ( format.equalsIgnoreCase( "html" ) )			{				HTMLRenderContext renderContext = new HTMLRenderContext( );				renderContext.setImageDirectory( "image" ); //$NON-NLS-1$				HashMap appContext = new HashMap( );				appContext.put( EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT,						renderContext );				task.setAppContext( appContext );			}			// setup the locale			task.setLocale( getLocale( locale ) );			task.run( );			return 0;		}		catch ( EngineException e )		{			logger.log( Level.SEVERE, e.getMessage( ), e );			return -1;		}	}