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
}
		runAndRenderTask.setRenderOption( option );
		HashMap context = new HashMap( );
		
		context.put( "org.eclipse.birt.data.engine.dataset.cache.option",
				Boolean.TRUE );
		context.put( EngineConstants.APPCONTEXT_BIRT_VIEWER_HTTPSERVET_REQUEST,
				request );
		context.put( EngineConstants.APPCONTEXT_CLASSLOADER_KEY,
				ReportEngineService.class.getClassLoader( ) );
 		if ( ParameterAccessor.PARAM_FORMAT_PDF.equalsIgnoreCase( format ) )
   		{
   			context.put( EngineConstants.APPCONTEXT_PDF_RENDER_CONTEXT,
   					createPDFrenderContext( ) );
   		}
 		else if ( htmlRenderContext != null )
 		{
			context.put( EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT,
					htmlRenderContext );
 		}
		else
 		{
 			context.put( EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT,
					createHTMLrenderContext( svgFlag, request
							.getServletPath( ) ) );
 		} 
		runAndRenderTask.setAppContext( context );
		try
		{
			runAndRenderTask.run( );