IMetricSetServiceGenerateMetricSet(String, Guid, Guid, IEnumerableString, IEnumerableString, IEnumerableString, IEnumerableString, PersistencePolicy) Method

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 (26.2.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  String
The name of the metric set.
parentId  Guid
The ID of the parent file or folder.
structureId  Guid
The structure ID.
measures  IEnumerableString
The measures.
columnHierarchies  IEnumerableString
The column hierarchies.
rowHierarchies  IEnumerableString
The row hierarchies.
slicerHierarchies  IEnumerableString
The slicer hierarchies.
persistencePolicy  PersistencePolicy
A value indicating whether the entity should be created as persistent or transient.

Return Value

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