IMetricSetServiceGenerateMetricSet Method (String, Guid, Guid, IEnumerableString, IEnumerableString, IEnumerableString, 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.4.0.1000)
Syntax
MetricSet GenerateMetricSet(
	string name,
	Guid parentId,
	Guid structureId,
	IEnumerable<string> measures,
	IEnumerable<string> columnHierarchies,
	IEnumerable<string> rowHierarchies,
	IEnumerable<string> slicerHierarchies,
	PersistencePolicy persistencePolicy
)

Parameters

name
Type: SystemString
The name of the metric set.
parentId
Type: SystemGuid
The ID of the parent file or folder.
structureId
Type: SystemGuid
The structure ID.
measures
Type: System.Collections.GenericIEnumerableString
The measures.
columnHierarchies
Type: System.Collections.GenericIEnumerableString
The column hierarchies.
rowHierarchies
Type: System.Collections.GenericIEnumerableString
The row hierarchies.
slicerHierarchies
Type: System.Collections.GenericIEnumerableString
The slicer hierarchies.
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
ArgumentExceptionmeasures, columnHierarchies, rowHierarchies and slicerHierarchies are all or empty or parentId or structureId is Empty or structureId references a structure that cannot be used for the automatic generation of a MetricSet. or name is null or empty.
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