DisplayValueDataType: DbDataType;
DisplayValueDataType: Prognoz.Platform.Interop.Dal.DbDataType;
The DisplayValueDataType property determines type of displayed attribute value.
If links are used in dictionaries, displayed attribute values used to establish links, may have data type that does not match type of attribute data. Type of displayed data depends on selected display format. Use this property to determine the type of displayed value.
Executing the example requires that the repository contains a cube with the CUBE identifier.
Add links to the Cubes, Dal, Dimensions, Metabase system assemblies.
Sub UserProc;
Var
mb: IMetabase;
cube: IStandardCube;
customdim: ICustomDimension;
attrs: ICustomDimAttributes;
attr: ICustomDimAttribute;
Begin
// Get repository
mb := MetabaseClass.Active;
// Get cube
cube := mb.ItemById("CUBE").Edit As IStandardCube;
// Get facts dimension
customdim := cube.FactDimension.Dimension As ICustomDimension;
// Get collection of dimension attributes
attrs := customdim.Attributes;
// Get attribute of facts dimension
attr := attrs.Order;
// Set the facts dimension attributes as displayed
attr.HasDisplayValues:=True;
// Determine type of displayed attribute value
Select Case attr.DisplayValueDataType
Case DbDataType.NoData: Debug.WriteLine("No data");
Case DbDataType.String: Debug.WriteLine("Data type: string");
Case DbDataType.Integer: Debug.WriteLine("Data type: integer");
Case DbDataType.Float: Debug.WriteLine("Data type: real");
Case DbDataType.DateTime: Debug.WriteLine("Data type: date and time");
Case DbDataType.Blob: Debug.WriteLine("Data type: array of binary or character data");
Case DbDataType.Boolean: Debug.WriteLine("Data type: logical");
Case DbDataType.Date: Debug.WriteLine("Data type: date without time");
Case DbDataType.Decimal: Debug.WriteLine("Data type: decimal high-precision values");
End Select;
// Save changes
(customDim As IMetabaseObject).Save;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Dal;
Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Metabase;
…
Var
mb: IMetabase;
cube: IStandardCube;
customdim: ICustomDimension;
attrs: ICustomDimAttributes;
attr: ICustomDimAttribute;
Begin
// Get repository
mb := Params.Metabase;
// Get cube
cube := mb.ItemById["CUBE_SEP_PARAMS_1"].Edit() As IStandardCube;
// Get facts dimension
customdim := cube.FactDimension.Dimension As ICustomDimension;
// Get collection of dimension attributes
attrs := customdim.Attributes;
// Get attribute of facts dimension
attr := attrs.Order;
// Set the facts dimension attributes as displayed
attr.HasDisplayValues:=True;
// Determine type of displayed attribute value
Select Case attr.DisplayValueDataType
Case DbDataType.ddtNoData: System.Diagnostics.Debug.WriteLine("No data");
Case DbDataType.ddtString: System.Diagnostics.Debug.WriteLine("Data type: string");
Case DbDataType.ddtInteger: System.Diagnostics.Debug.WriteLine("Data type: integer");
Case DbDataType.ddtFloat: System.Diagnostics.Debug.WriteLine("Data type: real");
Case DbDataType.ddtDateTime: System.Diagnostics.Debug.WriteLine("Data type: date and time");
Case DbDataType.ddtBlob: System.Diagnostics.Debug.WriteLine("Data type: array of binary or character data");
Case DbDataType.ddtBoolean: System.Diagnostics.Debug.WriteLine("Data type: logical");
Case DbDataType.ddtDate: System.Diagnostics.Debug.WriteLine("Data type: date without time");
Case DbDataType.ddtDecimal: System.Diagnostics.Debug.WriteLine("Data type: decimal high-precision values");
End Select;
// Save changes
(customDim As IMetabaseObject).Save();
End Sub;
After executing the example the console window will display the type of displayed attribute value of facts dimension.
See also: