Bug 140976 assert condition off by one in ReportEngineService
The following assertion appears around line 516 in org.eclipse.birt.report.viewer\birt\WEB-INF\classes\org\eclipse\birt\report\services\ReportEngineService.java assert pageNumber > 0 && pageNumber < reportDocument.getPageCount( ); However, since page numbers start at 1 instead of 0, pageNumber could equal reportDocument.getPageCount(). So the assertion should be assert pageNumber > 0 && pageNumber <= reportDocument.getPageCount( );
viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/service/ReportEngineService.java
}
		catch ( EngineException e )
		{
			AxisFault fault = new AxisFault( );
			fault
					.setFaultCode( new QName(
							"ReportEngineService.renderImage( )" ) ); 
			fault.setFaultString( e.getLocalizedMessage( ) );
			throw fault;
		}
	}
	/**
	 * Create HTML render context.
	 * 
	 * @param svgFlag
	 * @param servletPath
	 * @return
	 */
	private HTMLRenderContext createHTMLrenderContext( boolean svgFlag,
			String servletPath )
	{
		HTMLRenderContext renderContext = new HTMLRenderContext( );
		renderContext.setImageDirectory( imageDirectory );
		renderContext.setBaseImageURL( contextPath + imageBaseUrl );
		if ( servletPath != null
				&& servletPath.length( ) > 0
				&& !servletPath
						.equalsIgnoreCase( IBirtConstants.SERVLET_PATH_PREVIEW ) )
		{
			renderContext.setBaseURL( this.contextPath + servletPath );