1. Home
  2. /
  3. Docs
  4. /
  5. Articles Report Writer
  6. /
  7. Interactive Report
  8. /
  9. Anchors

Anchors

Using Report Anchors

Anchors allow you to create clickable navigation inside a Articles report. They work like links on a web page: clicking a control jumps to another location within the prepared report.

Typical uses include:

  • Table of contents
  • Jumping to sections in long reports
  • โ€œBack to topโ€ links
  • Navigation between summary and detail sections

Creating an anchor

Every anchor must have a unique name. Anchors are created in the report script using the report engine.

Syntax:

Engine.AddAnchor('AnchorName');

You usually add anchors in a control event, such as OnBeforePrint.

Example:

procedure Memo4OnBeforePrint(Sender: TfrxComponent);
begin
  Engine.AddAnchor('InventorySection');
end;

When this memo prints, Articles records its position and assigns it the anchor name InventorySection.


Creating a link to an anchor

To make a control clickable, use its Hyperlink property. In this example, we use a TfrxMemoView.

  1. Select the memo (or any view object).
  2. In the Object Inspector, expand Hyperlink.
  3. Set:
    • Kind = hkAnchor
    • Value = InventorySection (or the anchor name you used in script)

When the report is previewed:

  • The mouse cursor changes to a hand pointer over the memo.
  • Clicking the memo jumps directly to the object where the anchor was created.

Example workflow

1. Add an anchor at a section header (in script):

Engine.AddAnchor('TopOfReport');

2. Add a clickable link to that anchor (in the memoโ€™s Hyperlink):

  • Kind = hkAnchor
  • Value = TopOfReport

Result:
Clicking the memo scrolls the preview to the anchor location.


Notes and best practices

  • Anchor names must be unique within the report.
  • Anchor navigation works in:
    • Report preview
    • PDF export
    • HTML export
  • Anchors do not affect layout, band size, or print order.
  • Avoid spaces in anchor names; use simple identifiers like:
    • Section1
    • CustomerList
    • TopOfPage