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
* Image handler instance.
	 */
	private HTMLServerImageHandler imageHandler = null;
	/**
	 * Web app context path.
	 */
	private String contextPath = null;
	/**
	 * Constructor.
	 * 
	 * @param config
	 */
	public ReportEngineService( ServletConfig servletConfig )
	{
		System.setProperty( "RUN_UNDER_ECLIPSE", "false" ); 
		if ( servletConfig == null )
		{
			return;
		}
		config = new EngineConfig( );
		
		HTMLEmitterConfig emitterConfig = new HTMLEmitterConfig( );
		emitterConfig.setActionHandler( new HTMLActionHandler( ) );
		imageHandler = new HTMLServerImageHandler( );
		emitterConfig.setImageHandler( imageHandler );
		config.getEmitterConfigs( ).put( "html", emitterConfig ); 
		
		String resourcePath = servletConfig.getServletContext( )
				.getInitParameter(
						ParameterAccessor.INIT_PARAM_BIRT_RESOURCE_PATH );