Condividi tramite


LevelNamingTemplate (Level Interface)

Nota

  Questa caratteristica verrà rimossa a partire dalla prossima versione di Microsoft SQL Server. Non utilizzare questa caratteristica in un nuovo progetto di sviluppo e modificare non appena possibile le applicazioni in cui è attualmente implementata.

The LevelNamingTemplate property of the Level interface defines how levels in a parent-child hierarchy are named.

Applies To:clsAggregationLevel, clsCubeLevel, clsDatabaseLevel, clsPartitionLevel

Data Type

String

Access

Access depends on the value of the ClassType property of the object. This property applies only to levels whose SubClassType is sbclsParentChild or sbclsMining.

Class type

Access

clsDatabaseLevel

R/W

clsCubeLevel

R

clsPartitionLevel

R

clsAggregationLevel

R

Osservazioni

There are two ways to create a level-naming template. You can design a naming pattern or you can specify a list of names. A naming pattern contains an asterisk (*) as a placeholder character for a counter that is incremented and inserted into the name of each new and deeper level. For example, a LevelNamingTemplate value of Level * results in the level names Level 1, Level 2, Level 3, and so on, if no (All) level is defined. If a naming pattern does not contain the placeholder, it is first used as is, and then subsequent level names are formed by appending a space and a number to the end of the pattern. For example, the LevelNamingTemplate Level results in the level names Level, Level 1, Level 2, and so on.

To use a specific set of names for the LevelNamingTemplate property, create a list of level names and separate them with semicolons. Each member of the list is used for a subsequent level name. If the number of levels exceeds the number of names in the list, the last name in the list is used as a template for any additional level names. For example, a LevelNamingTemplate value of Division;Group;Unit results in the level names Division, Group, Unit, Unit 1, Unit 2, and so on. By contrast, a LevelNamingTemplate value of Division;Group;Unit * results in the level names Division, Group, Unit 3, Unit 4, and so on.

Each name in the list is treated as a template to ensure uniqueness of level names. A LevelNamingTemplate value of Manager;Team Lead;Manager;Team Lead;Worker * results in the level names Manager, Team Lead, Manager 1, Team Lead 1, Worker 5, Worker 6.

To use the asterisk (*) character in a level name using LevelNamingTemplate, use two asterisks (**).

Vedere anche

Riferimento