7.3.2 Hyperlinks to a Target (Anchor)
You can designate any report element as a target (similar to an HTML anchor), and hyperlink to the target from another element within the same report. You can hyperlink to a fixed target, or dynamically select the target based on user action. Targeted hyperlinks can also be exported to PDF format.
Defining a Target (Anchor)
To define an element (Tables, Charts, Text) as a target, follow the steps below:
1. Right-click on the element, and select 'Properties' from the context menu. This opens the 'Properties' dialog box.
For a Section Element, you can specify dynamic target names for elements within the bands. This is useful when you wish to link to a specific data record within an element, as opposed to the element itself.
2. Click the Attributes tab of the 'Properties' dialog box, and enter a valid target name in the 'Target' field.
3. Click 'OK' to close the dialog box.
Hyperlinking to a Target
To define a hyperlink to a target, follow the steps in Defining a Hyperlink. Choose the 'Asset Link' option, and enter one of the following in the 'Link' field:
• #targetName to link to fixed target with name “targetName”
• #{HyperlinkParameterName}, to dynamically link to a target whose name is supplied by “HyperlinkParameterName,” where HyperlinkParameterName is one of the parameters listed in the 'Name' field of the 'Parameters' panel (under the Hyperlink tab).

Walkthrough
In the next example you will create a report with a Chart and a Section, one below the other. Both elements will be bound to the 'All Sales' query. You will define hyperlinks for the Chart so that when you click on an employee's bar in the Chart, you will be directed to the page of the report containing the Section group header for the corresponding employee.
To create the report, follow the steps below:
1. Click the 'New' button on the Style Studio menu. This opens the 'New Asset' dialog box.
2. In the left panel select 'Report'. In the right 'Types' panel, select 'Blank Tabular Report' and click 'OK'.
3. From the Style Studio Toolbox panel, drag a Chart component into the new report. This opens the Data and Binding panels. Make the following selections:
a. In the Data panel, expand the 'Orders' data source and the 'All Sales' query.
b. Drag the 'Employee' field from the 'All Sales' query to the 'X' region in the Binding panel.
c. Drag the 'Total' field from the 'All Sales' query to the 'Y' region in the Binding panel
4. Click below the Chart to place the insertion point at that location.
5. In the Style Studio Toolbox panel, click the Section button. This opens the 'Data Binding' dialog box for a new Section. Make the following selections:
a. Select the Data tab. Expand the 'Orders' data source and the 'All Sales' query.
b. Select the Grouping & Summary tab. Drag the 'Employee' field to the 'Grouping' panel, and drag the 'Total' field to the 'Summary' panel.
c. Click 'Finish' to close the 'Data Binding' dialog box.
4. Define a target for every 'Employee' group header in the Section. Note that the 'Employee' group header is generated once for each employee name. To label each generated header target with the actual employee name, follow the steps below:
a. Expand the Style Studio Properties panel. (Select 'Properties Pane' from the Window menu.)
b. Select the 'Employee' Text element in the 'GH1' band.

c. In the Properties panel, click the Script tab. Enter the following script:
target = field.Employee
Click the green 'Apply' button. This script will set the 'Target' property of the header text element in each iteration of the header band to the corresponding employee name. (See Target Property in Report Scripting for more information).
d. Set the font of the header Text element to Bold-12 Point. (Use the buttons in the Style Studio toolbar.)
5. Hyperlink the chart to the Section header targets. Follow the steps below:
a. Click on one of bars in the Chart.
b. Select the Hyperlink tab in the Properties panel.
c. Select the 'Asset Link' option.
d. In the 'Link' field, type “#{emp}”.
e. In the 'Parameters' panel, press the 'Add Parameter' button. This opens the 'Parameter' dialog box.
Enable 'Preview Server Features' on the General tab of the 'Style Studio Configuration' dialog box (select 'Configure' from the File menu).
f. In the 'Name' field of the dialog box, enter “emp” as the parameter name.
g. Select the 'Field' option and select 'Employee' from the 'Value' menu.

h. Click the green 'Apply' button.
9. Preview the report. Verify that you can click on any bar in the chart to link to the corresponding Section header.
| << Passing Report Parameters | © 1996-2013 InetSoft Technology Corporation (v11.4) | 7.4 Highlighting >> |