DisplayValueDataType: 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 fact dimension
customdim := cube.FactDimension.Dimension As ICustomDimension;
// Get collection of dimension attributes
attrs := customdim.Attributes;
// Get fact dimension attribute
attr := attrs.Order;
// Set that act dimension attribute values are displayed
attr.HasDisplayValues:=True;
// Determine a 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: high precision decimal values");
End Select;
// Save changes
(customDim As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the console window will display the type of displayed attribute value of facts dimension.
See also: