ActionType: TabHyperlinkActionType;
The ActionType property determines type of the action executed on hyperlink click.
Executing the example requires that the repository contains a regular report with the REGULAR_REPORT identifier. The report contains two sheets named Sheet1 and Sheet2. The first sheet contains data area with the DATAISLAND identifier, the second sheet contains a chart with the PrxChart1 identifier. The source that is used as a base for plotting a data area has a dimension with the D_TO identifier in its structure.
Sub UserProc;
Var
MB: IMetabase;
Report: IPrxReport;
DI: IPrxDataIsland;
DIC: IPrxDataIslandDimensionCommon;
Drill: IPrxDimensionDrill;
DimMode: IPrxSliceDimension;
Dim: IDimensionModel;
Begin
MB := MetabaseClass.Active;
Report := MB.ItemById("REGULAR_REPORT").Edit As IPrxReport;
DI := Report.DataIslands.FindById("DATAISLAND").Edit;
Dim := DI.Slice.Dimensions.FindById("D_TO").Dimension.Dimension;
DIC := DI.Properties.Dimension(Dim);
DIC.Drilled := TriState.OnOption;
Drill := DIC.Drill;
Drill.Mode := PrxDataDrillMode.Replace;
DimMode := Report.DataSources.Item(0).Slices.Item(1).Dimensions.FindById("D_TO");
Drill.Dimension := DimMode;
Drill.Index := DimMode.Dimension.Dimension.Indexes.PrimaryIndex;
Drill.Attribute := Dim.Attributes.Id;
Drill.Sheet := Null;
Drill.ActionType := TabHyperlinkActionType.ShowObject;
Drill.Action := "#Sheet2!PrxChart1";
DI.Save;
Report.MetabaseObject.Save;
End Sub UserProc;
After executing the example clicking the hyperlink brings the user to the second sheet of the report and positions chart at the center.
See also: