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
{
		IGetParameterDefinitionTask task = getParameterDefinitionTask( design );
		return task.getDefaultValue( parameterName );
	}
	public void setContext( Object context, InputOptions options )
	{
		HttpServletRequest request = ( HttpServletRequest ) options
				.getOption( InputOptions.OPT_REQUEST );
		ServletContext servletContext = ( ServletContext ) context;
		ReportEngineService.getInstance( ).setEngineContext( servletContext,
				request );
	}
	public Map getParsedParameters( IViewerReportDesignHandle design,
			InputOptions options, Map parameters )
			throws ReportServiceException
	{
		Locale locale = ( Locale ) options.getOption( InputOptions.OPT_LOCALE );
		Collection parameterList = getParameterDefinitions( design, options,
				false );
		Map paramMap = new HashMap( );
		Boolean isDesignerBoolean = ( Boolean ) options
				.getOption( InputOptions.OPT_IS_DESIGNER );
		boolean isDesigner = ( isDesignerBoolean != null ? isDesignerBoolean
				.booleanValue( ) : false );
		IGetParameterDefinitionTask task = getParameterDefinitionTask( design );
		IReportRunnable runnable = getReportRunnable( design );
		Map configMap = runnable.getTestConfig( );
		for ( Iterator iter = parameterList.iterator( ); iter.hasNext( ); )
		{
			ParameterDefinition parameterObj = ( ParameterDefinition ) iter