OnlyFirstNamingHyperlinkShown: TriState;
OnlyFirstNamingHyperlinkShown: Prognoz.Platform.Interop.ForeSystem.TriState;
The OnlyFirstNamingHyperlinkShown property determines whether hyperlinks will be displayed only for dimension attribute that is the first in order to display dimension elements names in working area.
To get attribute indicating whether hyperlinks are displayed only for the first dimension attribute in order to display dimension elements names in working area, the IEaxGridDimensionSettings.IsOnlyFirstNamingHyperlinkShown method is used
To execute the example:
Make sure that the repository contains an express report with dimension containing attributes in different columns.
Place the Button, Label, UiErAnalyzer and TabSheetBox components on the form specifying the Button1, Label1, UiErAnalyzer1 and TabSheetBox1 identifiers correspondingly.
Add links to the system assemblies: Express, ExtCtrls, Forms, ForeSystem (for Fore.NET), Metabase, Pivot, Tab.
The example is the OnClick event handler for the component with the Button1 identifier.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Eax: IEaxAnalyzer;
Prop: IEaxGridDimensionSettings;
PivotDim: IDataAreaHeaderSettingsBase;
Begin
// Open express report with the key 71208
Eax := MetabaseClass.Active.Item(71208).Edit As IEaxAnalyzer;
Eax := UiErAnalyzer1.ErAnalyzer;
// Find data source dimension with the key 10152
PivotDim := Eax.Pivot.Dimensions.FindByKey(10152) As IDataAreaHeaderSettingsBase;
// Check the attribute of hyperlink display for the first dimension attribute in order
Prop := Eax.Grid.ViewSettings.GetViewSettings(PivotDim) As IEaxGridDimensionSettings;
If Prop.IsOnlyFirstNamingHyperlinkShown = False Then
// Enable hyperlink display for the first dimension attribute in order
Prop.OnlyFirstNamingHyperlinkShown := TriState.OnOption;
Label1.Text := "Hyperlink display only for the first dimension attribute in order";
Else
// Enable hyperlink display for all dimension attributes
Prop.OnlyFirstNamingHyperlinkShown := TriState.OffOption;
Label1.Text := "Hyperlink display for all dimension attributes";
End If;
(Eax As IMetabaseObject).Save;
End Sub Button1OnClick;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.ExtCtrls;
Imports Prognoz.Platform.Interop.Forms;
Imports Prognoz.Platform.Interop.ForeSystem;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Pivot;
Imports Prognoz.Platform.Interop.Tab;
…
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
MB: IMetabase;
Eax: IEaxAnalyzer;
Prop: IEaxGridDimensionSettings;
PivotDim: IDataAreaHeaderSettingsBase;
Begin
// Open express report with the key 71208
MB := Params.Metabase;
Eax := MB.Item[71208].Edit() As IEaxAnalyzer;
// Find data source dimension with the key 10152
PivotDim := Eax.Pivot.Dimensions.FindByKey(10152) As IDataAreaHeaderSettingsBase;
// Check the attribute of hyperlink display for the first dimension attribute in order
Prop := Eax.Grid.ViewSettings.GetViewSettings[PivotDim] As IEaxGridDimensionSettings;
If Prop.IsOnlyFirstNamingHyperlinkShown = False Then
// Enable hyperlink display for the first dimension attribute in order
Prop.OnlyFirstNamingHyperlinkShown := TriState.tsOnOption;
Label1.Text := "Hyperlink display only for the first dimension attribute in order";
Else
// Enable hyperlink display for all dimension attributes
Prop.OnlyFirstNamingHyperlinkShown := TriState.tsOffOption;
Label1.Text := "Hyperlink display for all dimension attributes";
End If;
(Eax As IMetabaseObject).Save();
End Sub;
After executing the example, clicking the button with the Button1 identifier in the component with the Label1 identifier displays the state of hyperlink displaying for dimension attributes.
See also: