Classes


Class actuate.data.ResultSet

Represents a data set retrieved from a report document. The functions in the ResultSet class access the data by row. ResultSet keeps an internal reference to the current row and increments the current row with #next.
Member of: actuate.data.

Class Summary
Constructor Attributes Constructor Name and Description
 
There is no public constructor for ResultSet.
Method Summary
Method Attributes Method Name and Description
 
Returns an array of column names.
 
getValue(columnIndex)
Returns the value of the specified column from the current row.
 
next()
Increments the current row for the ResultSet.
Class Detail
actuate.data.ResultSet()
There is no public constructor for ResultSet. The actuate.DataService#downloadResultSet and actuate.Viewer#downloadResultSet functions 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:
	viewer.downloadResultSet(request, parseRS)
	function parseRS(resultset){
		// do something with resultset
	}
See:
actuate.DataService#downloadResultSet
actuate.Viewer#downloadResultSet
Method Detail
{String[ ]} getColumnNames()
Returns an array of column names. 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];
	}
Returns:
{String[ ]} The column names.

{String} getValue(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. 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);
Parameters:
{integer} columnIndex
The numerical index of the column from which to retrieve data.
Returns:
{String} The field value.

{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. This example returns the value for the column with an index value of 4 from all of the rows in the ResultSet object myResult:
	function getColumn4Rows(myResult){
		var nextrow = myResult.next( );
		while (nextrow){
			return myResult.getValue(4);
			nextrow = myResult.next( );
		}
	}
Returns:
{boolean} True indicates a successful row increment. False indicates that there are no further rows.

Documentation generated by JsDoc Toolkit 2.0.1 on Tue Jan 29 2013 05:44:21 GMT-0800 (PST)