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
.next( );
			String paramValue = null;
			Object paramValueObj = null;
			String paramName = parameterObj.getName( );
			String format = parameterObj.getPattern( );
			ReportParameterConverter converter = new ReportParameterConverter(
					format, locale );
			Set paramNames = null;
			if ( parameters != null )
			{
				paramNames = parameters.keySet( );
			}
			if ( parameters != null && paramName != null )
			{
				boolean found = false;
				for ( Iterator it = paramNames.iterator( ); it.hasNext( ); )
				{
					String name = ( String ) it.next( );
					if ( paramName.equals( name ) )
					{
						if ( parameters.get( name ) != null )
							paramValue = parameters.get( name ).toString( );
						paramValueObj = converter.parse( paramValue,
								parameterObj.getDataType( ) );
						paramMap.put( paramName, paramValueObj );
						found = true;
						break;
					}
				}
				if ( !found && configMap.containsKey( paramName ) && isDesigner )