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
}
		catch ( EngineException e )
		{
			throw new ReportServiceException( e.getLocalizedMessage( ) );
		}
		ViewerAttributeBean attrBean = ( ViewerAttributeBean ) request
				.getAttribute( "attributeBean" ); 
		Map parsedParams = attrBean.getParameters( );
		parsedParams.putAll( this.getParsedParameters( design, runOptions,
				parameters ) );
		try
		{
			ReportEngineService.getInstance( ).runReport( request, runnable,
					outputDocName, locale, ( HashMap ) parsedParams );
		}
		catch ( RemoteException e )
		{
			e.printStackTrace( );
			throw new ReportServiceException( e.getLocalizedMessage( ) );
		}
		return outputDocName;
	}
	public IViewerReportDesignHandle getReportDesignHandle( String docName,
			InputOptions options )
	{
		IReportDocument doc = ReportEngineService.getInstance( )
				.openReportDocument( getReportDesignName( options ), docName );
		String fileName = doc.getReportRunnable( ).getReportName( );
		doc.close( );