Class actuate.report.Table
Description
A container for a table element in a report. Table provides functions to operate on a table element, such as manipulating columns, groups, and data.
Constructor
The table object is constructed by viewer.PageContent.getTableByBookmark( ).
Function summary
Table 4-30 lists actuate.report.Table functions.
Table 4-30 actuate.report.Table functions Gets the table data by column index and returns only the data from the current visible page. getRow( ) getType( ) groupBy( ) hide( ) show( ) submit( ) Submits all the asynchronous operations that the user has requested on this report and renders the table component on the page.actuate.report.Table.clearFilters
Syntax
Clears the filters of a given column.
Parameters
String. The name of the column.
Example
This example clears existing filters from the PRODUCTLINE column.
actuate.report.Table.getBookmark
Syntax
Returns
String. The name of the table.
Example
This example displays the table’s bookmark in an alert box.
actuate.report.Table.getColumn
Syntax
Gets the table data by column index. Returns the data from the current visible page.
Parameters
Integer. Optional. The numerical index of the column from which to retrieve data. The getColumn( ) function returns the values for the first column when no value is provided for columnIndex.
Returns
Array. A list of data in the format of the column.
Example
This example returns the first column in myTable.
actuate.report.Table.getHtmlDom
Syntax
Returns
String. The name of the table.
Example
This example displays the HTML DOM element for this table inside a red border.
actuate.report.Table.getPageContent
Syntax
Returns the page content to which this table belongs.
Returns
actuate.viewer.PageContent. report content.
Example
This example displays the viewer ID of the page content in an alert box.
actuate.report.Table.getRow
Syntax
Gets the table data by row index. Returns the data from the current visible page.
Parameters
Integer. Optional. The numerical index of the row from which to retrieve data. The getRow( ) function returns the values for the first row when no value for rowIndex is provided.
Returns
Array. A list of data in the format of the columns that cross the row.
Example
This example retrieves the first row in myTable.
actuate.report.Table.getType
Syntax
Returns the report element type of this object, which is table.
Returns
Example
This example returns the report element type of this object in an alert box.
actuate.report.Table.groupBy
Syntax
Adds an inner group to this table.
Parameters
String. The name of the column to add as a new inner group to the table.
Example
This example adds the column TOTAL to myTable.
actuate.report.Table.hide
Syntax
Example
actuate.report.Table.hideColumn
Syntax
Hides a table column by specifying the column name.
Parameters
String. The data binding name for the column to hide.
Example
This example hides the TOTAL column from myTable.
actuate.report.Table.hideDetail
Syntax
Hides information for a column from the grouped data displayed on the page. If every column is hidden, only the group name is visible.
Parameters
String. The data binding name for the column to hide.
Example
This example hides the TOTAL column from the grouped data visible for myTable.
actuate.report.Table.removeGroup
Syntax
Parameters
String. The name of the group to remove.
Example
This example removes the inner group MYGROUP from myTable and displays an alert box after calling submit( ).
actuate.report.Table.setFilters
Syntax
Applies a filter or filters to this table element.
Parameters
actuate.data.Filter object. A single filter condition to apply to this table.
An array of actuate.data.Filter objects. Filter conditions to apply to this table.
Example
To add a filter the table to display only entries with a CITY value of NYC, use the following code:
var city_filter = new actuate.data.Filter("CITY", actuate.data.Filter.EQ, "NYC");actuate.report.Table.setSorters
Syntax
Adds a sorter or Sorters to this table.
Parameters
actuate.data.Sorter object. A single sort condition to apply to this table.
An array of actuate.data.Sorter objects. Sort conditions to apply to this table.
Example
This example adds the myStateSorter and myCitySorter sorters to myTable.
actuate.report.Table.show
Syntax
Example
Use show( ) to reveal a report Table, as shown in the following code:
actuate.report.Table.showColumn
Syntax
Shows the table column by specifying the column name.
Parameters
String. The data binding name for the column to display.
Example
This example shows the PRODUCTLINE column in myTable.
actuate.report.Table.showDetail
Syntax
Displays information for a column from the grouped data displayed on the page. If every column is hidden, only the group name is visible.
Parameters
String. The data binding name for the column to display.
Example
This example shows the information from the PRODUCTLINE column in the grouped data that is displayed for myTable.
actuate.report.Table.submit
Syntax
Submits all the asynchronous operations for this table element. The submit( ) function triggers an AJAX request to submit all the asynchronous operations. When the server finishes the processing, it returns a response and the results are rendered on the page in the table container.
Parameters
Function. The function called after the asynchronous call processing finishes.
Example
This example clears existing filters from the PRODUCTLINE column and pops up an alert box.
actuate.report.Table.swapColumns
Syntax
Swaps the columns to reorder to column sequence of the table.
Parameters
String. The first column to swap in the column order.
String. The second column to swap in the column order.
Example
This example swaps the TOTAL and PRODUCTLINE columns in myTable.
(c) Copyright Actuate Corporation 2011 |
![]() |