IMetricSetServiceGenerateMetricSet Method (Guid, Guid, IEnumerableString, PersistencePolicy)

Creates and saves a MetricSet using one of the supported structures. It allows specifying hints for the contained elements. These can be NativeStructure, DataCube or CubePerspective.

Namespace:  Dundas.BI.Entities.MetricSets
Assembly:  Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (24.3.0.1000)
Syntax
MetricSet GenerateMetricSet(
	Guid parentId,
	Guid structureId,
	IEnumerable<string> elements,
	PersistencePolicy persistencePolicy
)

Parameters

parentId
Type: SystemGuid
The ID of the parent file or folder.
structureId
Type: SystemGuid
The structure ID.
elements
Type: System.Collections.GenericIEnumerableString
The elements.
persistencePolicy
Type: Dundas.BI.EntitiesPersistencePolicy
A value indicating whether the entity should be created as persistent or transient.

Return Value

Type: MetricSet
The newly created metric set.
Exceptions
ExceptionCondition
ArgumentExceptionelements is or empty or parentId or structureId is Empty or structureId references a structure that cannot be used for the automatic generation of a MetricSet.
ExternalHierarchyExceptionA metric set cannot be generated directly from a TimeHierarchy or UserHierarchy.
NotFoundExceptionparentId or structureId does not exist.
QuotaExceededExceptionGenerating the metric set would cause the entity quota for metric sets or one of the underlying entity types to be exceeded.
NoPrivilegeExceptionCaller does not have access to one or more of the specified objects.
InvalidSessionExceptionThe caller context is not associated with a valid session.
DataProviderLoadExceptionThe data provider may throw this exception if it requires third party driver to be installed.
DataConnectionExceptionThe connection cannot be established.
InvalidMetricSetSourceExceptionThe source structure is invalid such as a stored procedure with parameters or a table value function with parameters.
See Also