throw new EngineException( "Error happened while running the report", ex );
	protected void doRender( long pageNumber ) throws EngineException	{		try		{			IContentEmitter emitter = createContentEmitter( );			ReportDesignHandle reportDesign = executionContext.getDesign( );			String format = executionContext.getOutputFormat( );			if ( "pdf".equalsIgnoreCase( format ) ) //$NON-NLS-1$			{				IReportExecutor executor = new ReportPageReader(						executionContext, pageNumber, false );				executor = new LocalizedReportExecutor( executionContext,						executor );				executionContext.setExecutor( executor );				initializeContentEmitter( emitter, executor );				IReportLayoutEngine layoutEngine = LayoutEngineFactory						.createLayoutEngine( format );				OnPageBreakLayoutPageHandle handle = new OnPageBreakLayoutPageHandle( executionContext );				layoutEngine.setPageHandler( handle );				startRender( );				layoutEngine.layout( executor, emitter, false );				closeRender( );				executor.close( );			}			else			{				IReportExecutor executor = new ReportExecutor(						executionContext, reportDesign, null );				executor = new LocalizedReportExecutor( executionContext,						executor );				executionContext.setExecutor( executor );				initializeContentEmitter( emitter, executor );				// start the render				ReportContentLoader loader = new ReportContentLoader(						executionContext );				startRender( );				loader.loadPage( pageNumber, bodyOnly, emitter );				closeRender( );				executor.close( );			}		}		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;		}	}