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
}
						if ( value != null )
						{
							buf.append( value );
						}
						for ( int i = 1; i < columnNames.length; i++ )
						{
							buf.append( ',' ); 
							try
							{
								value = cvsConvertor( (String) DataTypeUtil
										.convert( iData
												.getValue( columnNames[i] ),
												DataType.STRING_TYPE ) );
							}
							catch ( Exception e )
							{
								value = null;
							}
							if ( value != null )
							{
								buf.append( value );
							}
						}
						buf.append( '\n' );
						outputStream.write( buf.toString( ).getBytes( ) );
						buf.delete( 0, buf.length( ) );
					}
				}
			}