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
String scriptlibClassPath = ""; 
		for ( int i = 0; i < jarFileList.size( ); i++ )
			scriptlibClassPath += EngineConstants.PROPERTYSEPARATOR
					+ ( (File) jarFileList.get( i ) ).getAbsolutePath( );
		if ( scriptlibClassPath.startsWith( EngineConstants.PROPERTYSEPARATOR ) )
			scriptlibClassPath = scriptlibClassPath
					.substring( EngineConstants.PROPERTYSEPARATOR.length( ) );
		System.setProperty( EngineConstants.WEBAPP_CLASSPATH_KEY,
				scriptlibClassPath );
		config.setEngineHome( "" ); 
	}
	/**
	 * Get engine instance.
	 * 
	 * @return
	 */
	public static ReportEngineService getInstance( )
	{
		return instance;
	}
	/**
	 * Get engine instance.
	 * 
	 * @return engine instance
	 */
	public static void initEngineInstance( ServletConfig servletConfig )
			throws BirtException
	{
		if ( ReportEngineService.instance != null )
		{