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
{
	public BirtViewerReportService( ServletConfig conf )
	{
		try
		{
			ReportEngineService.initEngineInstance( conf );
		}
		catch ( BirtException e )
		{
			
			e.printStackTrace( );
		}
	}
	public String runReport( IViewerReportDesignHandle design,
			String outputDocName, InputOptions runOptions, Map parameters )
			throws ReportServiceException
	{
		IReportRunnable runnable;
		String reportDesignName = design.getFileName( );
		HttpServletRequest request = ( HttpServletRequest ) runOptions
				.getOption( InputOptions.OPT_REQUEST );
		Locale locale = ( Locale ) runOptions
				.getOption( InputOptions.OPT_LOCALE );
		try
		{
			runnable = ReportEngineService.getInstance( ).openReportDesign(
					reportDesignName );