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 5-11 lists actuate.xtabanalyzer.Level functions.
actuate.xtabanalyzer.Level.addAttribute
Syntax  
void Level.addAttribute(actuate.xtabanalyzer.LevelAttribute attr)
Adds the level attribute.
Parameters
index
actuate.xtabanalyzer.LevelAttribute object. A level attribute.
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 );
actuate.xtabanalyzer.Level.getAttributes
Syntax  
actuate.xtabanalyzer.LevelAttribute[ ] Level.getAttributes( )
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( );
actuate.xtabanalyzer.Level.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;
}  
actuate.xtabanalyzer.Level.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;
}  
actuate.xtabanalyzer.Level.setIndex
Syntax  
void Level.setIndex(integer index)
Sets the level index.
Parameters
index
Integer. The level index.
Example
This example sets the level index:
function assignIndex(level,index){
  if (level){
    return level.setIndex(index);
  }
}  
actuate.xtabanalyzer.Level.setLevelName
Syntax  
void Level.setLevelName(string levelName)
Sets the level name.
Parameters  
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 );
  }
}

Additional Links:

Copyright Actuate Corporation 2012