Hyperlink: ITabHyperlink;
The Hyperlink property determines the parameters of a hyperlink in the cell, realized by the ITabHyperlink interface.
Executing the example requires a form, a button located on this form and named Button1, the ReportBox component and the UiReport component named UiReport1. UiReport1 is used as a data source for the ReportBox component. A regular report containing several pages should be connected to the UiReport1 component.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
TSheet: ITabSheet;
TRange: ITabRange;
Style: ITabCellStyle;
Hyperlink: ITabHyperlink;
Begin
TSheet := ((UiReport1.Instance As IPrxReport).ActiveSheet As IPrxTable).TabSheet;
TRange := TSheet.Cell(0, 0);
Style := TRange.Style;
Hyperlink := Style.Hyperlink;
Hyperlink.Action := "=Sheet2";
Hyperlink.Enable := TriState.OnOption;
Hyperlink.SeparateLinkText := TriState.OnOption;
Hyperlink.Text := "Go to Sheet2";
End Sub Button1OnClick;
Clicking the button in the A0 cell of the active sheet of the regular report creates a hyperlink with the following text. Go to the Sheet 2. Clicking this hyperlink carries you to the regular report page named Sheet2.
See also: