UseCustomDimensionNamingAttribute(DimKey: Integer): Boolean;
UseCustomDimensionNamingAttribute[DimKey: uinteger]: boolean;
DimKey. Dimension key.
The UseCustomDimensionNamingAttribute property determines whether custom names will be used for dimension elements.
Available Values:
True. Custom names will be used for dimension elements.
False. To compose dimension elements names, dictionary attributes will be used.
Executing this example requires an express report with the EXPRESS identifier. In express report there is a data source containing dimension with the D_TO identifier.
Add links to the Metabase, Express, Pivot, Dimensions system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Express: IEaxAnalyzer;
SelSet: IDimSelectionSet;
DimSel: IDimSelection;
DataArea: IEaxDataArea;
AreaSlice: IEaxDataAreaSlice;
Properties: IEaxDataAreaSliceProperties;
Key: Integer;
Begin
MB := MetabaseClass.Active;
Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
// Get selection basing on which table is built
SelSet := Express.Pivot.Selection;
DimSel := SelSet.FindById("D_TO");
// Get analytical data area
DataArea := Express.DataArea;
// Get data source slice
AreaSlice := DataArea.Slices.Item(0);
// Get properties of data source slice
Properties := AreaSlice.Properties;
Key := DimSel.Dimension.Key;
Properties.UseCustomDimensionNamingAttribute(Key) := True;
// Save report
(Express As IMetabaseObject).Save;
End Sub UserProc;
After executing the example custom names will be used for elements of specified dimension.
The requirements and result of the Fore.NET Example execution match with those in the Fore Example.
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Dimensions;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Express: IEaxAnalyzer;
SelSet: IDimSelectionSet;
DimSel: IDimSelection;
DataArea: IEaxDataArea;
AreaSlice: IEaxDataAreaSlice;
Properties: IEaxDataAreaSliceProperties;
Key: uinteger;
Begin
MB := Params.Metabase;
Express := MB.ItemById["EXPRESS_CUSTOMNAMING"].Edit() As IEaxAnalyzer;
// Get selection basing on which table is built
SelSet := Express.Pivot.Selection;
DimSel := SelSet.FindById("D_TO");
// Get analytical data area
DataArea := Express.DataArea;
// Get data source slice
AreaSlice := DataArea.Slices.Item[0];
// Get properties of data source slice
Properties := AreaSlice.Properties;
Key := DimSel.Dimension.Key;
Properties.UseCustomDimensionNamingAttribute[Key] := True;
// Save report
(Express As IMetabaseObject).Save();
End Sub;
See also: