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( ) );
			}
		}
		return task;
	}
	public long getPageNumberByBookmark( String docName, String bookmark,
			InputOptions options ) throws ReportServiceException
	{
		IReportDocument doc = ReportEngineService.getInstance( )
				.openReportDocument( getReportDesignName( options ), docName );
		long pageNumber = doc.getPageNumber( bookmark );
		doc.close( );
		return pageNumber;
	}
	public long getPageNumberByObjectId( String docName, String objectId,
			InputOptions options ) throws ReportServiceException
	{
		
		return 0;
	}
	public void runAndRenderReport( IViewerReportDesignHandle design,
			String outputDocName, InputOptions options, Map parameters,
			OutputStream out, List activeIds ) throws ReportServiceException
	{
		
		String reportDesignName = design.getFileName( );
		HttpServletRequest request = ( HttpServletRequest ) options
				.getOption( InputOptions.OPT_REQUEST );