The actuate.data.ResultSet class represents the data retrieved from a report document. The functions in the actuate.data.ResultSet class access the data by row. The actuate.data.ResultSet class keeps an internal reference to the current row and increments the current row with next( ).
Constructor
There is no public constructor for actuate.data.ResultSet. The actuate.DataService.downloadResultSet and actuate.Viewer.downloadResultSetfunctions instantiate the ResultSet object. Set the reference to the ResultSet object in the callback function. For example, when the result set is used as the input parameter for the callback function, result becomes the label for the ResultSet, as shown below:
This example retrieves the first, third, and fifth column names from the ResultSet object myResult:
function get135Columns(myResult){
var columns = myResult.getColumns( );
return columns[0];
return columns[2];
return columns[4];
}
getValue
Syntax
string ResultSet.getValue(integer columnIndex)
Returns the value of the specified column from the current row. Specify the column by its numerical index. Use next( ) before using getValue( ) to set the cursor to the first record.
Parameter
columnIndex
Integer. The numerical index of the column from which to retrieve data.
Returns
String. The field value.
Example
This example returns the value for the column with an index value of 4 from the current row in the ResultSet object myResult:
return myResult.getValue(4);
next
Syntax
boolean next( )
Increments the current row for the ResultSet. When no current row is set, next( ) sets the current row to the first row in the ResultSet. When no next row exists, next( ) returns false.
Returns
Boolean. True indicates a successful row increment. False indicates that there are no further rows.
Example
This example returns the value for the column with an index value of 4 from all of the rows in the ResultSet object myResult: