Selecting Members by Using Generation and Level Names

Generation and level name selection commands identify a specific level or generation of members based on either of the following items:

When you use generation and level names, changes to the outline are automatically reflected in the report. You can define your own generation and level names or use the default names provided by Essbase. See Generations and Levels.

Using generation or level names whenever possible makes the report easier to maintain. Because you do not have to specify a member name in the report, you need not change the report if the member name is changed or deleted from the database outline.

Note:

Generation and level names are standalone commands. You cannot use them in place of member names in report extraction or formatting commands such as <DESCENDANTS or <CHILDREN.

  To use default level names, at the point in the script where you want to select a member by the default level name, use the format:

Levn,dimensionName 

where n is the level number.

dimensionName is the name of the dimension from which you want to select the members.

Note:

Do not insert a space after the comma.

For example, Lev1,Year selects all the level 1 members of the Year dimension.

  To use default generation names, at the point in the script where you want to select a member by the default generation name, use the format:

Genn,dimensionName 

where n is the generation number.

dimensionName is the name of the dimension from which you want to select the members.

Note:

Do not insert a space after the comma.

For example, Gen2,Year selects all the generation 2 members of the Year dimension.

Note:

These default generation and level names are not displayed in Outline Editor.

The following example report script uses the default generation name Gen2,Year to generate a report that includes the members Qtr1, Qtr2, Qtr3, and Qtr4 from the Year dimension:

<PAGE(Product)
<COLUMN(Year)
<ROW (Measures)
{OUTALTNAMES}
Cola
Gen2,Year
Sales Profit
    !

Resulting report:

                         Cola Market Scenario
                   Qtr1     Qtr2     Qtr3     Qtr4
                 ======== ======== ======== ========   
Sales              14,585   16,048   17,298   14,893
    Profit          5,096    5,892    6,583    5,206