DimensionAttribute.NamingTemplate Property
Gets or sets how levels are named in a parent-child hierarchy constructed from the DimensionAttribute object.
Espace de noms: Microsoft.AnalysisServices
Assembly: Microsoft.AnalysisServices (in microsoft.analysisservices.dll)
Syntaxe
'Déclaration
<XmlElementAttribute(IsNullable:=False)> _
<EditorAttribute("Microsoft.AnalysisServices.Design.LevelNamingTemplateUITypeEditor, Microsoft.AnalysisServices.Design", GetType(UITypeEditor))> _
Public Property NamingTemplate As String
[XmlElementAttribute(IsNullable=false)]
[EditorAttribute("Microsoft.AnalysisServices.Design.LevelNamingTemplateUITypeEditor, Microsoft.AnalysisServices.Design", typeof(UITypeEditor))]
public string NamingTemplate { get; set; }
[XmlElementAttribute(IsNullable=false)]
[EditorAttribute(L"Microsoft.AnalysisServices.Design.LevelNamingTemplateUITypeEditor, Microsoft.AnalysisServices.Design", typeof(UITypeEditor))]
public:
property String^ NamingTemplate {
String^ get ();
void set (String^ value);
}
/** @property */
public String get_NamingTemplate ()
/** @property */
public void set_NamingTemplate (String value)
public function get NamingTemplate () : String
public function set NamingTemplate (value : String)
Valeur de propriété
A string that defines how levels are named in a parent-child hierarchy constructed from the DimensionAttribute object.
Notes
The value of the NamingTemplate property is used only by parent attributes (that is, the value of the Usage is set to Parent).
When a parent attribute is used to construct a hierarchy, the levels of the hierarchy are determined by the parent-child relationships between members contained by the parent attribute. Therefore, unlike other dimensions, the level names cannot be drawn from the attribute names that are used for the hierarchy.
Instead, a naming template is used to generate level names for parent-child hierarchies. The NamingTemplate property, defined in the parent attribute, contains a string expression used to define level names. There are two ways to define a naming template for a parent attribute. You can either 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, using Level * results in the level names Level 01, Level 02, Level 03, and so on, if no (All) level is defined. If a naming pattern does not contain the placeholder character, 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, using Level results in the level names Level, Level 01, Level 02, and so on.
To use a specific set of names for the naming, the value of the NamingTemplate property is set to a semicolon-delimited list of level names. Each name in 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, with a space and ordinal number appended to the last name as described earlier. For example, using Division;Group;Unit results in the level names Division, Group, Unit, Unit 01, Unit 02, and so on. By contrast, using Division;Group;Unit * results in the level names Division, Group, Unit 03, Unit 04, and so on.
Each name in the list is treated as a template to ensure uniqueness of level names. For example, using Manager;Team Lead;Manager;Team Lead;Worker * results in the level names Manager, Team Lead, Manager 01, Team Lead 01, Worker 05, Worker 06.
Use two asterisks (**) to include the asterisk (*) character in a level name as part of a naming template.
Sécurité des threads
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Plateformes
Plateformes de développement
Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.
Plateformes cibles
Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.
Voir aussi
Référence
DimensionAttribute Class
DimensionAttribute Members
Microsoft.AnalysisServices Namespace