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
public IReportDocument openReportDocument( String systemId, String docName )
	{
		IReportDocument document = null;
		try
		{
			synchronized ( this.getClass( ) )
			{
				document = engine.openReportDocument( systemId, docName );
			}
		}
		catch ( Exception e )
		{
		}
		return document;
	}
	/**
	 * Render image.
	 * 
	 * @param imageId
	 * @param outputStream
	 * @throws EngineException
	 */
	public void renderImage( String imageId, OutputStream outputStream )
			throws RemoteException
	{
		assert ( this.imageHandler != null );
		try
		{
			this.imageHandler.getImage( outputStream, this.imageDirectory,
					imageId );