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/BirtViewerReportService.java
ReportEngineService.getInstance( ).renderImage( imageId, out );
		}
		catch ( RemoteException e )
		{
			throw new ReportServiceException( e.getLocalizedMessage( ) );
		}
	}
	public ToC getTOC( String docName, String tocId, InputOptions options )
			throws ReportServiceException
	{
		IReportDocument doc = ReportEngineService.getInstance( )
				.openReportDocument( getReportDesignName( options ), docName );
		TOCNode node = null;
		if ( tocId != null )
		{
			node = doc.findTOC( tocId );
		} else
		{
			node = doc.findTOC( null );
		}
		if ( node == null )
		{
			throw new ReportServiceException( "Invalid TOC query." ); 
		}
		doc.close( );
		return transformTOCNode( node );
	}
	public long getPageCount( String docName, InputOptions options )
			throws ReportServiceException
	{