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
masterPage, svgFlag, Boolean.TRUE, activeIds, htmlRenderContext );
	}
	synchronized private void runAndRenderReport( HttpServletRequest request,
			IReportRunnable runnable, OutputStream outputStream, String format,
			Locale locale, Map parameters, boolean masterPage, boolean svgFlag,
			Boolean embeddable, List activeIds, HTMLRenderContext htmlRenderContext ) throws RemoteException
	{
		assert runnable != null;
		
		HTMLRenderOption option = new HTMLRenderOption( );
		option.setOutputStream( outputStream );
		option.setOutputFormat( format );
		option.setMasterPageContent( masterPage );
		if ( embeddable != null )
		{
			option.setEmbeddable( embeddable.booleanValue( ) );
		}
		if ( activeIds != null )
		{
			option.setInstanceIDs( activeIds );
		}
		IRunAndRenderTask runAndRenderTask = null;
		synchronized ( this.getClass( ) )
		{
			runAndRenderTask = engine.createRunAndRenderTask( runnable );
		}
		runAndRenderTask.setLocale( locale );
		if ( parameters != null )
		{
			runAndRenderTask.setParameterValues( parameters );