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
Collection selectionList = task.getSelectionListForCascadingGroup(
				groupName, groupKeys );
		return convertEngineParameterSelectionChoice( selectionList );
	}
	public Collection getParameterSelectionList(
			IViewerReportDesignHandle design, InputOptions runOptions,
			String paramName ) throws ReportServiceException
	{
		IGetParameterDefinitionTask task = getParameterDefinitionTask( design );
		Collection selectionList = task.getSelectionList( paramName );
		return convertEngineParameterSelectionChoice( selectionList );
	}
	private IGetParameterDefinitionTask getParameterDefinitionTask(
			IViewerReportDesignHandle design ) throws ReportServiceException
	{
		IGetParameterDefinitionTask task;
		if ( design.getContentType( ) == IViewerReportDesignHandle.RPT_RUNNABLE_OBJECT )
		{
			
			IReportRunnable runnable = ( IReportRunnable ) design
					.getDesignObject( );
			task = ReportEngineService.getInstance( )
					.createGetParameterDefinitionTask( runnable );
		} else
		{
			
			try
			{
				task = getParameterDefinitionTask( design.getFileName( ) );
			}