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.MetricSets
Assembly: Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (26.2.0.1000)
Syntax
HierarchyUsage AddReplaceHierarchy(
	MetricSet metricSet,
	Guid elementParentId,
	string elementName,
	PlacementPosition placement,
	Guid hierarchyParentId,
	string hierarchyUniqueName,
	string levelUniqueName,
	bool retainAllElements = false
)

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

HierarchyUsage
The hierarchy usage element.
Exceptions
ExceptionCondition
ArgumentExceptionelementParentId 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.
InvalidOperationExceptionThe 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.
ArgumentNullExceptionmetricSet is .
NotFoundExceptionThe structure with the specified elementParentId or hierarchyParentId does not exist.
InvalidSessionExceptionThe caller context is not associated with a valid session.
InvalidOperationExceptionAdding an element to the metric set will exceed the configured maximum.
See Also