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
boolean isResourceOk = true;
		if ( resourcePath == null || resourcePath.trim( ).length( ) <= 0
				|| ParameterAccessor.isRelativePath( resourcePath ) )
		{
			isResourceOk = false;
		}
		else
		{
			File resourceFile = new File( resourcePath );
			if ( !resourceFile.exists( ) )
			{
				isResourceOk = resourceFile.mkdirs( );
			}
		}
		if ( isResourceOk )
		{
			SessionHandle.setBirtResourcePath( resourcePath );
		}
		
		imageDirectory = servletConfig.getServletContext( ).getInitParameter(
				ParameterAccessor.INIT_PARAM_IMAGE_DIR );
		if ( imageDirectory == null || imageDirectory.trim( ).length( ) <= 0
				|| ParameterAccessor.isRelativePath( imageDirectory ) )
		{
			imageDirectory = servletConfig.getServletContext( ).getRealPath(
					"/report/images" ); 
		}
		
		imageBaseUrl = "/run?__imageID=";