Class actuate.xtabanalyzer.Crosstab
Description
The actuate.xtabanalyzer.Crosstab class represents a cross tab report element.
Constructor
Syntax
Constructs a new Crosstab object.
Function summary
Table 5-3 lists actuate.xtabanalyzer.Crosstab functions.
Table 5-3 actuate.xtabanalyzer.Crosstab functions drill( ) Drills up or down measure levels, replacing drill and filter conditions. Drills down a measure level, updating drill conditions. drillUp( ) Drills up a measure level, updating drill conditions. getData( ) Retrieves the content of the page the cross tab belongs to. getRow( ) getType( ) pivot( ) submit( )actuate.xtabanalyzer.Crosstab.addDimension
Syntax
Adds a dimension to the cross tab object.
Parameters
actuate.xtabanalyzer.Dimension object.
Example
This example adds a date-based, multi-level dimension to a cross tab.
actuate.xtabanalyzer.Crosstab.addMeasure
Syntax
Adds a measure to the cross tab object.
Parameters
actuate.xtabanalyzer.Measure object.
The options for the add measure operation. These options distinguish the function call’s origin, which can be from another dialog or directly from the Actuate JavaScript API.
Example
This example adds a measure to a cross tab.
In this example, the expression set with setExpression( ) is in easyscript, which is described in Using Actuate BIRT Designer Professional.
actuate.xtabanalyzer.Crosstab.applyOptions
Syntax
void Crosstab.applyOptions(actuate.xtabanalyzer.Options xtOptions, string measureDirection, string rowMirrorStartingLevel, string columnMirrorStartingLevel, string emptyCellValue)Sets measure direction, empty settings, row mirror starting level, column mirror starting level, and empty cell value.
Parameters
actuate.xtabanalyzer.Options object. Contains a set of xtabanalyzer options. When an actuate.xtabanalyzer.Options object is specified, applyOptions( ) ignores all subsequent parameters.
String. Sets the measure direction.
String. Sets the mirror starting level empty setting for a row.
String. Sets the mirror starting level empty setting for a column.
String. Sets the value of an empty cell.
actuate.xtabanalyzer.Crosstab.
changeMeasureDirectionSyntax
Switches the measure direction between horizontal and vertical.
Example
This example changes the measure direction.
actuate.xtabanalyzer.Crosstab.clearFilters
Syntax
Clears the filters contained within a level.
Parameters
actuate.xtabanalyzer.Level object. The level from which to clear the filters. To clear all filters, do not specify a level.
Example
This example clears the filters from the level filterLevel.
actuate.xtabanalyzer.Crosstab.drill
Syntax
Drills up or down a dimension level.
Parameters
actuate.xtabanalyzer.Driller object. The driller object specifies drill conditions on a dimension.
Example
This example drills to a level within a dimension. Any existing drill conditions are replaced.
actuate.xtabanalyzer.Crosstab.drillDown
Syntax
Drills down a dimension level. This method updates the drill conditions specified in the driller object and leaves all other conditions in place.
Parameters
Example
This example drills down a level within a dimension. Any existing drill conditions are updated.
actuate.xtabanalyzer.Crosstab.drillUp
Syntax
Drills up a dimension level. This method updates the drill conditions specified in the driller object and leaves all other conditions in place.
Parameters
Example
This example drills up a level within a dimension. Any existing drill conditions are updated.
actuate.xtabanalyzer.Crosstab.editMeasure
Syntax
Edits a measure in the Computed Measure view.
Parameters
actuate.xtabanalyzer.Measure object.
Integer. Options for the editMeasure function. These options distinguish the function call’s origin, which can be from another dialog or directly from the Actuate JavaScript API.
Example
actuate.xtabanalyzer.Crosstab.getBookmark
Syntax
Returns the bookmark that is associated with the cross tab element.
Returns
String. The cross tab bookmark.
Example
The following code retrieves the bookmark that is associated with the Crosstab object.
actuate.xtabanalyzer.Crosstab.getColumn
Syntax
string[ ] Crosstab.getColumn(integer columnIndex)Returns the table data by column index.
Parameters
Integer. The column index, starting with 1.
Returns
String[ ]. An array of string values. This function returns null when the value of columnIndex is out of range. This function only returns data from the current visible page.
Example
The following code retrieves data from a data column.
actuate.xtabanalyzer.Crosstab.getData
Syntax
Array Crosstab.getData(boolean forceReparse)Returns the data in a cross tab.
Parameters
Boolean. Forces a cache refresh when true.
Returns
Array. The array of string values in the cross tab.
actuate.xtabanalyzer.Crosstab.getHtmlDom
Syntax
Returns the HTML element DOM object.
Returns
Example
The following code retrieves the DOM object and uses the DOM object to retrieve an element within the document.
actuate.xtabanalyzer.Crosstab.getPageContent
Syntax
Returns the page content of the current page that this cross tab belongs to. This function returns the same information as XTabAnalyzer.getCurrentPageContent( ).
Returns
actuate.xtabanalyzer.PageContent. The report content.
Example
This example retrieves the page content.
actuate.xtabanalyzer.Crosstab.getRow
Syntax
string[ ] Crosstab.getRow(integer rowIndex)Returns table data based on row index.
Parameters
Integer. The row index, starting with 1.
Returns
String[ ]. An array of string values. This function returns null when the value of rowIndex is out of range. This function only returns data from the current visible page.
Example
The following code retrieves data from a data row.
actuate.xtabanalyzer.Crosstab.getType
Syntax
Returns the report element type.
Returns
String containing the value "Crosstab".
actuate.xtabanalyzer.Crosstab.hideDetail
Syntax
Hides details of the specified level.
Parameters
String. The dimension level full name.
Example
This example hides lower level details in a level.
actuate.xtabanalyzer.Crosstab.pivot
Syntax
Example
This example pivots a crosstab.
actuate.xtabanalyzer.Crosstab.removeDimension
Syntax
Removes a dimension from the cross tab.
Parameters
actuate.xtabanalyzer.dimension object, or a dimension index or a dimension name. The dimension to remove.
Integer. The dimension axis type. Axis type can be one of the following values:
n actuate.xtabanalyzer.Dimension.COLUMN_AXIS_TYPE
n actuate.xtabanalyzer.Dimension.ROW_AXIS_TYPEAn array of actuate.xtabanalyzer.Level objects, a level index array, or a level name array.
Example
This example removes a dimension with several layers. The level names are in a text control named levelNames and are separated by semicolons.
actuate.xtabanalyzer.Crosstab.reorderDimension
Syntax
void Crosstab.reorderDimension(actuate.xtabanalyzer.Dimension dimension, integer axisType, integer newIndex, integer newAxisType)Reorders a dimension within a cross tab. This function can change a dimension’s index or axis type.
Parameters
actuate.xtabanalyzer.dimension object, or a dimension index or a dimension name. The dimension to reorder.
Integer. The dimension axis type. Axis type can be one of the following values:
n actuate.xtabanalyzer.Dimension.COLUMN_AXIS_TYPE
n actuate.xtabanalyzer.Dimension.ROW_AXIS_TYPEThe new index for the dimension.
Example
This example changes the index and axis type of a dimension.
actuate.xtabanalyzer.Crosstab.removeMeasure
Syntax
Removes a measure from the cross tab.
Parameters
actuate.xtabanalyzer.measure object, index, or name. The measure to remove.
Example
This example removes a measure from a cross tab.
actuate.xtabanalyzer.Crosstab.reorderMeasure
Syntax
void Crosstab.reorderMeasure(actuate.xtabanalyzerMeasure measure,
integer newIndex)Reorders a measure within a cross tab.
Parameters
actuate.xtabanalyzer.Measure object, or a measure index or a measure name. The measure to reorder.
The new index for the measure.
Example
This example reorders a measure.
actuate.xtabanalyzer.Crosstab.setFilters
Syntax
Sets an array of filters for the cross tab.
Parameters
Array of actuate.xtabanalyzer.Filter objects.
Example
This example creates a filter object and then places it into the cross tab.
actuate.xtabanalyzer.Crosstab.setSorters
Syntax
Sets an array of sorters for the cross tab.
Parameters
Array of actuate.xtabanalyzer.Sorter objects.
Example
This example creates a sorter and adds it to the cross tab.
actuate.xtabanalyzer.Crosstab.setTotals
Syntax
void Crosstab.setTotals(actuate.xtabanalyzer.GrandTotal[ ] grandTotals, actuate.xtabanalyzer.SubTotal[ ] subTotals)Sets totals for the cross tab. To set a subtotal, make the first parameter null.
Parameters
Array of actuate.xtabanalyzer.GrandTotal objects.
Array of actuate.xtabanalyzer.SubTotal objects.
Example
This example adds a grand total to a cross tab.
actuate.xtabanalyzer.Crosstab.showDetail
Syntax
Shows a level of detail within a cross tab.
Parameters
String. The dimension axis type. Axis type can be one of the following values:
n actuate.xtabanalyzer.Dimension.COLUMN_AXIS_TYPE
n actuate.xtabanalyzer.Dimension.ROW_AXIS_TYPEAn actuate.xtabanalyzer.Dimension object, index, or name that indicates the dimension information to show.
Example
This example uses showDetail to expose extra detail on a level.
actuate.xtabanalyzer.Crosstab.submit
Syntax
Applies the changes made to this element. This is an asynchronous operation.
Parameters
Function. An optional function called when submit( ) completes. This function receives the current XTabAnalyzer object as a parameter.
Example
This example uses submit( ) to confirm changes to the cross tab.
(c) Copyright Actuate Corporation 2011 |
![]() |