Hyperlink Tool Tips in a Report

The tool tip for a hyperlink can be made dynamic, to include field values for the current record. This only applies to the table element. The field value is inserted using the format {field name}. e.g A table bound to the All Sales query could have the hyperlink tool tip defined as: ‘Invoice for order {Order Number} placed by {Employee}’.

Hyperlinks to Targets (Anchors)

Every report element can be set to be a target (anchor). You can define a hyperlink from any report element to any target within the same report. The target name can be made dynamic and passed as a parameter from the hyperlinked element. Target hyperlinks are also exported to the PDF format.

Defining a Target (Anchor)

To define an element (Tables, Charts, Text) as a target, right-click on the element, and select ‘Properties’ from the context menu. Click the Attributes tab of the ‘Properties’ dialog box, and enter any valid target name in the ‘Target’ field. Note: A section element can have dynamic target names for elements within its bands. This is useful when we wish to link to a specific data record within an element as opposed to just the element itself.

Hyperlinking to a Target

To define a hyperlink to a target, choose the Asset Link option. Specify the hyperlink as #HardCodedTargetName or #{HyperlinkParameter Name}.

In this example you will create a report which contains a Chart and a Section one below the other. Both elements are bound to the All Sales query. The chart provides a summarized view (X-Axis:Employee; Y-Axis: sum(Total)), while the section provides a detailed view (Group:Employee; Summary sum(Total)). You will define targets for every group header in the section (Employee) to which you will define hyperlinks in the chart. Then when we click on an employee (bar) in the chart, you will be directed to the page containing the header corresponding to the employee name.

First add dynamic targets to the section header text. Right-click on the text element (in the Header1 band) → Script. Add the following script in the script dialog box.

target = field['Employee'];

You will hyperlink the chart to the section header targets. Right-click on the chart → Hyperlink. Choose the Asset Link option. Pass the X-label as a parameter named emp. Enter #{emp} in the combo box under the Link: heading. On preview, you can click on any bar in the chart to link to the target header in the section.

Highlighting

When a Text element, Textbox element, or Table element is bound to data, highlights can be defined for the element. A Highlight is comprised of a foreground color, a background color, and a font, which are applied to the element when a specific data condition is met.

Highlighting a Text or Textbox Element

To add a highlight to a Text or Textbox element, right-click on the element and choose ‘Highlight’ from the context menu.

The Highlight tab is now available in the bottom panel. Click ‘New’ to add a new highlight. You can assign to the highlight both foreground and background colors, as well as a specific font. Use the ‘Edit Condition’ button to add the conditions that will control highlighting.

You can assign different highlights to the same text, with each highlight representing a different condition. The highlight which is applied to the text will be the highlight whose corresponding condition is met by the current data.

Previous: Advanced Enterprise Reporting Topics