Bug 176114 row._rownum implementation issues
This Bugzilla seeks to clarify the usage of the "row.__rownum" binding, and to track its correct implementation in BIRT Data engine. We shall define the "__rownum" binding to mean: the 0-based index of the current data row in the final result set available to a listing report item. "Final" result set means the result set after all applicable filter and sort conditions are applied. This definition implies: (1) "row.__rownum" is not available to expressions used to define a filter or sort condition. Since filtering and sorting affects the row indexes, they cannot make forward reference to the final row index. This restriction applies to all filters and sorts, including those defined on groups. (2) Group key expression can use "row.__rownum", since grouping does not change the row ordering or ID. In fact one of the common usage of the row.__rownum binding is to create row number based interval grouping (e.g., put every 20 rows in a group). BIRT should report a sensible error message if row.__rownum is found to be used in sorting or filtering. Where a row number based sort/filter is desired, the report designer is encouraged to use the Total.runningCount aggregation.
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/i18n/ResourceConstants.java
public final static String NOT_END_GROUP  = "data.engine.EndOfGroupOnly";
	public final static String INVALID_AGGR = "data.engine.InvalidAggregation";
	public final static String INVALID_AGGR_GROUP_LEVEL  = "data.engine.InvalidAggrGroup";
	public final static String INVALID_AGGR_PARAMETER  = "data.engine.WrongNumAggrArgs";
	public final static String INVALID_AGGR_GROUP_EXPRESSION ="data.engine.InvalidAggrGroupExpression";
	public final static String INVALID_NESTED_AGGR_GROUP = "data.engine.AggrParamGroupLevelInconsistent";
	public final static String DUPLICATE_PROPERTY_NAME = "data.engine.DupPropertyName";
	public final static String SUBQUERY_NOT_FOUND = "data.engine.NoSubQueryName";
	public final static String MISSING_DATASOURCE_EXT_ID = "data.engine.DataSourceMissingExtId";
	public final static String STARTING_GROUP_VALUE_CANNOT_BE_NULL = "data.engine.NullGroupStart";
	
	public final static String RESULT_CLOSED = "data.engine.ResultClosed";
	public final static String NO_CURRENT_ROW = "data.engine.NoCurrentRow";
	public final static String INVALID_JS_EXPR = "data.engine.InvalidJSExpr";
	public final static String INVALID_TOTAL_NAME = "data.engine.InvalidTotalFuncName";
	public final static String INVALID_TOTAL_EXPRESSION = "data.engine.InvalidTotalFunc";
	public final static String INVALID_CALL_AGGR = "data.engine.NoAggrFunc";
	public final static String INVALID_EXPR_HANDLE = "data.engine.InvalidExprHandle";	
	
	public final static String INVALID_KEY_COLUMN = "data.engine.InvalidSortKeyColumn";
	public final static String INVALID_GROUP_LEVEL = "data.engine.InvalidGroupLevel";
	public final static String INVALID_GROUP_KEY_COLUMN = "data.engine.InvalidGroupKeyName";
	public final static String INVALID_CLOSESCRIPT = "data.engine.BadCloseScript";
	public final static String INVALID_CUSTOM_FIELD_INDEX = "data.engine.InvalidCustomFieldIdx";
	public final static String INVALID_GROUP_NAME = "data.engine.InvalidGroupName";
	public final static String DUPLICATE_GROUP_NAME = "data.engine.DuplicateGroupName";
	public final static String INVALID_OPENSCRIPT = "data.engine.BadOpenScript";
	public final static String DS_HAS_OPENED = "data.engine.DataSourceIsOpen";
	public final static String DS_NOT_OPEN = "data.engine.DataSourceNotOpen";
	public final static String CUSTOM_FIELD_EMPTY = "data.engine.EmptyCustomFieldName";