The MemberNameColumn property of the Level interface contains the name of the column that contains member names. This property is useful in situations where the member key column may not contain information recognizable to the user.
For example, a table may contain the columns SKU and Product_Name. When you generate queries by SKU number, you may want to display the corresponding product name for the sake of clarity. In this case, the member key column would be SKU, but the member name column would be Product_Name.
clsAggregationLevel | clsDatabaseLevel |
clsCubeLevel | clsPartitionLevel |
String
The access type depends on the level object class.
Class | Access |
---|---|
clsDatabaseLevel | R/W |
clsCubeLevel | R |
clsPartitionLevel | R |
clsAggregationLevel | R |
MemberNameColumn can be any valid SQL expression involving one or more columns from the table containing the MemberKeyColumn. For example, the following is a valid MemberNameColumn expression for a “Product”.”Prod_Year” member key column:
'Quarter ' & Format(DatePart('q',"""Product"".""Prod_Year"""))
The following is another example from an Employees table:
"""Employees"".""LastName""" & ', ' & """Employees"".""Firstname"""
If MemberNameColumn = "", the server uses MemberKeyColumn values as the member names.
Care should be taken when using MemberNameColumn expressions based on columns other than the columns used by the member key column. Ensure that there is always a one-to-one correspondence in the values produced by the MemberNameColumn and the MemberKeyColumn expressions.
Use the following code to set the MemberNameColumn property of a level object to the Product_Name column in table Sales:
' Assume an object (dsoLev) of ClassType clsLevel exists
dsoLev.MemberNameColumn = """Sales"".""Product_Name"""
About Decision Support Objects | Using Decision Support Objects |
Properties Cross-Reference |