IMetricSetServiceAddReplaceHierarchy Method |
Adds or replaces a
HierarchyUsage element to the metric set and saves it. It promotes the implicit hierarchy to the specified external hierarchy and sets the rendered top level.
Namespace: Dundas.BI.Entities.MetricSetsAssembly: Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (26.2.0.1000)
SyntaxHierarchyUsage AddReplaceHierarchy(
MetricSet metricSet,
Guid elementParentId,
string elementName,
PlacementPosition placement,
Guid hierarchyParentId,
string hierarchyUniqueName,
string levelUniqueName,
bool retainAllElements = false
)
Function AddReplaceHierarchy (
metricSet As MetricSet,
elementParentId As Guid,
elementName As String,
placement As PlacementPosition,
hierarchyParentId As Guid,
hierarchyUniqueName As String,
levelUniqueName As String,
Optional retainAllElements As Boolean = false
) As HierarchyUsage
HierarchyUsage^ AddReplaceHierarchy(
MetricSet^ metricSet,
Guid elementParentId,
String^ elementName,
PlacementPosition placement,
Guid hierarchyParentId,
String^ hierarchyUniqueName,
String^ levelUniqueName,
bool retainAllElements = false
)
abstract AddReplaceHierarchy :
metricSet : MetricSet *
elementParentId : Guid *
elementName : string *
placement : PlacementPosition *
hierarchyParentId : Guid *
hierarchyUniqueName : string *
levelUniqueName : string *
?retainAllElements : bool
(* Defaults:
let _retainAllElements = defaultArg retainAllElements false
*)
-> HierarchyUsage Parameters
- metricSet MetricSet
- The metric set.
- elementParentId Guid
- The parent entity ID for the element to be added.
- elementName String
- The name of the element (column/measure/hierarchy) to add.
- placement PlacementPosition
- The element placement position.
- hierarchyParentId Guid
- The external hierarchy parent ID.
- hierarchyUniqueName String
- The unique name of the external hierarchy.
- levelUniqueName String
- The unique name of the hierarchy level.
- retainAllElements Boolean (Optional)
- Gets or sets a value which will ensure all elements will be available if an automatic join occurs.
Return Value
HierarchyUsageThe hierarchy usage element.
Exceptions| Exception | Condition |
|---|
| ArgumentException | elementParentId or hierarchyParentId is Empty
or
elementName is not a valid non-empty string
or
placement is not a PlacementPosition valid value
or
elementParentId references an object that could not be found or an object that is invalid for the current operation.
|
| InvalidOperationException | The metric set is not checked out to the caller
or
the underlying IAnalysisStructure does not support the current operation, either because it is not auto-generated
or
joining to the structure specified by elementParentId is not supported. |
| ArgumentNullException | metricSet is . |
| NotFoundException | The structure with the specified elementParentId or hierarchyParentId does not exist. |
| InvalidSessionException | The caller context is not associated with a valid session. |
| InvalidOperationException | Adding an element to the metric set will exceed the configured maximum. |
See Also