Sorting and filtering cross tab data
Data within levels can be filtered and sorted. To sort data within a level, use the actuate.xtabanalyzer.Sorter class. Add an instance of the Sorter class to the cross tab with Crosstab.setSorters( ).
var sorter = new actuate.xtabanalyzer.Sorter("sortLevelName");
sorter.setAscending(false);
 
// Add the sort to the cross tab.
crosstab.setSorters(sorter);
crosstab.submit( );
Use the actuate.xtabanalyzer.Filter class to filter data within a level. A filter requires an operator and values to filter. Use Crosstab.setFilters( ) to place the filter within the cross tab.
var filter = new actuate.xtabanalyzer.Filter
("levelName",actuate.xtabanalyzer.Filter.BETWEEN);
// Filter between the values of 1000 and 2000.
var filterValue = "1000;2000";
filter.setValues(filterValue.split(";"));
crosstab.setFilters(filter);
crosstab.submit( );
To remove a filter from a level, use actuate.xtabanalyzer.Crosstab.clearFilters( ).
crosstab.clearFilters("levelName");
crosstab.submit( );