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
IRunTask runTask = null;
		synchronized ( this.getClass( ) )
		{
			runTask = engine.createRunTask( runnable );
		}
		runTask.setLocale( locale );
		runTask.setParameterValues( parameters );
		HashMap context = new HashMap( );
		
		context.put( "org.eclipse.birt.data.engine.dataset.cache.option",
				Boolean.TRUE );
		context.put( EngineConstants.APPCONTEXT_BIRT_VIEWER_HTTPSERVET_REQUEST,
				request );
		context.put( EngineConstants.APPCONTEXT_CLASSLOADER_KEY,
				ReportEngineService.class.getClassLoader( ) );
		runTask.setAppContext( context );
		
		try
		{
			runTask.run( documentName );
		}
		catch ( BirtException e )
		{
			
			AxisFault fault = new AxisFault( );
			fault
					.setFaultCode( new QName(
							"ReportEngineService.runReport( )" ) ); 
			fault.setFaultString( e.getLocalizedMessage( ) );
			throw fault;