Class actuate.xtabanalyzer.Level
Description
Defines a cross tab dimension level, its controls, and content.
Constructor
Syntax
actuate.xtabanalyzer.Level( )
Creates a cross tab Level object.
Function summary
Table 15‑11 lists actuate.xtabanalyzer.Level functions.
Table 15‑11 actuate.xtabanalyzer.Level functions
Function | Description |
| Adds the level attribute |
| Returns the level attributes |
| Returns the index of the level |
| Returns the level name |
| Sets the index level |
| Sets the level name |
addAttribute
Syntax
Adds the level attribute.
Parameter
index
Example
This example sets a name for newly created level attribute and assigns the attribute to a level:
var attribute = new actuate.xtabanalyzer.LevelAttribute( );
attribute.setName("pounds");
level.addLevelAttribute( attribute );
getAttributes
Syntax
Returns the level attributes.
Returns
Array of
actuate.xtabanalyzer.LevelAttribute objects. The level attributes.
Example
This example retrieves the level index and stores it in a variable called lattributes:
var lattributes = new actuate,xtabanalyzer.LevelAttribute[ ];
lattributes = level.getAttributes( );
getIndex
Syntax
integer Level.getIndex( )
Returns the level index.
Returns
Integer. The level index.
Example
This example retrieves the level index:
function levelIndex(level){
if (level){
return level.getIndex( );
}
return null;
}
getLevelName
Syntax
string Level.getLevelName( )
Returns the level name.
Returns
String. The level name.
Example
This example retrieves the level name:
function levelName(level){
if (level){
return level.getLevelName( );
}
return null;
}
setIndex
Syntax
void Level.setIndex(integer index)
Sets the level index.
Parameter
index
Integer. The level index.
Example
This example sets the level index:
function assignIndex(level,index){
if (level){
return level.setIndex(index);
}
}
setLevelName
Syntax
void Level.setLevelName(string levelName)
Sets the level name.
Parameter
levelName
String. The level name.
Example
This example sets level names for newly created levels:
var levelNames ="year;month;day";
...
function addLevels(dimension,levelNames);{
var levelNamesArray = levelNames.split(";");
for( var i = 0; i < levelNames.length; i++ ){
var level = new actuate.xtabanalyzer.Level( );
level.setLevelName(levelNames[i]);
dimension.addLevel( level );
}
}