Using Hyperlink Builder in Report Studio, you can link two sections or elements in the same report, link a column or element to an external report, or link a column or element to an external web site. The following section describes how to create each type of hyperlink.
Linking two sections in a report
To link one report element to another element in the same report, use a bookmark and a hyperlink. First, define a bookmark for the target report element. Then, define a hyperlink in the source report element. Figure 11‑5 shows an example that uses a bookmark and hyperlink to link two charts in the report.
Because the report is a multipage report, the section‑level pie chart uses a hyperlink for users to easily navigate between the current page and the bar chart at the beginning of the report. The bar chart contains a bookmark, ReportTableChart, that the hyperlink uses.
Figure 11‑5 Viewing a hyperlink source and target report
How to create a hyperlink that links two sections in a report
1 Select and right‑click the report column or report element for which you want to create a hyperlink. Choose Hyperlink.
2 Hyperlink Builder appears. In Hyperlink Builder, do the following:
1 In Hyperlink Type, select Bookmark in this report.
2 In Bookmark, choose EZ Script.
3 In EZ Script, in Enter Expression, type:
"ReportTableChart"
Choose OK. Bookmark displays the bookmark you specified. Figure 11‑6 uses the bookmark.
Figure 11‑6 Creating a bookmark to link sections in the same report
4 In Tooltip, optionally type the text to display when the user hovers the mouse pointer over the hyperlink. Choose OK.
The BIRT design displays the hyperlink based on the options you specified.
The example in Figure 11‑5 displays the result of the hyperlink specified in Figure 11‑6.
Linking to a section in a different report
When you create a link from one report to a different report, or a section in a different report, first create a bookmark in the target report. Then create a hyperlink in the source report. This type of hyperlink is called a drill‑through hyperlink. For drill-through hyperlink expressions, the EasyScript expression builder validates expressions using data fields that the target BIRT design and the source BIRT design share. If a data field does not appear in the list of available data fields in EZ Script, you must first add the data field to make it visible in this list.
When linking to an external report in the repository, you can create a hyperlink to a BIRT design, BIRT document, or to a file in any supported output format when exporting a report from the Viewers. Supported formats include PDF, PostScript, HTML, Microsoft Word, Excel, PowerPoint, and so on.
How to create a drill‑through hyperlink
The following procedure assumes that the target report already contains a bookmark.
1 Select and right‑click the report column or report element for which you want to create a hyperlink. Choose Hyperlink.
2 Hyperlink Builder appears. In Hyperlink Builder, do the following:
1 In Hyperlink Type, select Drill‑Through.
2 In Report, select Browse. Open File appears, as shown in Figure 11‑7.
Figure 11‑7 Navigating the folder structure to select a target report
3 In Open File, complete the following steps:
1 Navigate the file repository to the folder containing the target report.
2 If you know the name of the file you want to specify, type the name, or relevant keywords in Search. Then, press Enter. Open File displays the reports that match the string you provided. Select the file from the list of files that appears.
3 In Description, optionally type a description for the report.
Choose OK.
4 In Hyperlink Builder, choose More. Hyperlink Builder displays additional options, as shown in Figure 11‑8.
Figure 11‑8 Creating a drill‑through hyperlink to another report
5 In Bookmark, use EZ Script to specify the bookmark in the target report. Bookmark displays the specified bookmark. If the target report does not contain a bookmark, the hyperlink points to the beginning of the target report, using the name of the report file.
6 In Target, do one of the following:
Select Current browser window or tab.
Select New browser window or tab.
7 In File Format, if necessary, select a format in which to display the target report.
8 In Tooltip, optionally type the text to display when the user hovers the mouse pointer over the hyperlink.
Choose OK.
Report Studio creates the hyperlink based on the options you specified.
You can customize the data displayed in the target report and improve performance by using static filter parameters in the target report. Generating a filtered report is typically more efficient than generating a report that displays all the data. For example, Figure 11‑9 shows a target report containing static filter parameters, for which you can specify a different state value.
Figure 11‑9 Modifying a parameter value
For the value specified in the example shown in Figure 11‑9, Actuate Viewer displays sales details for Nevada, as shown in Figure 11‑10.
Figure 11‑10 Viewing a target report based on a parameter value
Using Hyperlink Builder, you can also create a data‑driven parameter value based on a data field in the report. Complete the following steps:
1 Double‑click the value enclosed in double quotation marks (" "), as shown in Figure 11‑9. EZ Script appears.
2 In EZ Script, in Enter Expression, type the left bracket ([), and select a data field from the list of fields that appears. Enclose the value in double quotation marks (" "). The example in Figure 11‑11 shows the selection of the data field, State. If the data field you want to use does not appear in the list, select Add Data Field to add the data field to the list. Make sure you use shared data fields, present in the source and target report data sets.
3 Select Validate to make sure the syntax for parameter value expression is correct.
4 After a message appears confirming that the expression is valid, as shown in Figure 11‑11, choose OK.
5 Hyperlink Builder displays the parameter expression you specified, as shown in Figure 11‑12.
Figure 11‑12 Displaying a parameter expression
6 Run the report to make sure the data displayed is what you expect.
When a user chooses the hyperlink, the target report uses the specified data field to prompt the user to supply a parameter value for which it retrieves data. In the target report, make sure that you set a default value for the static filter parameter, if the parameter is required. Report Studio does not require you to specify a default value for an optional static filter parameter.
Linking to a URL
You can also use hyperlinks to open an external document or web page by providing a uniform resource locator (URL). These links provide users with easy access to additional sources of information, creating more interactive reports.
For example, Figure 11‑13 shows a report displaying weekly stock performance. To provide a user with additional information about the company, you can create a hyperlink so that choosing a value in the company name field launches the company web site. In the example shown in Figure 11‑13, choosing MYCO directs a user to the web site, www.mycompany.com.
Figure 11‑13 Displaying a hyperlink to an external URL
How to create a hyperlink to an external URL
1 Select and right‑click the column for which you want to create a hyperlink. Choose Hyperlink.
2 Hyperlink Builder appears. In Hyperlink Builder, do the following:
1 In Hyperlink Type, select URL.
2 In Location, choose EZ Script, then do one of the following:
Type a single URL address that links all values of the data field. For example, type:
http://www.mycompany.com
Construct an expression for each data row to link to a unique URL, as shown in Figure 11‑14.
Figure 11‑14 Linking each data row to a unique URL
3 In Target, do one of the following:
Select Current browser window or tab.
Select New browser window or tab.
If you select Current browser window or tab and launch the target report from Report Studio, the target report launches in a new browser window or tab, in order to preserve the data in the BIRT design. When you run the report in Actuate Viewer, selecting this option launches the target report in the current browser window or tab, as expected.
4 In Tooltip, optionally type the text to display when the user hovers the mouse pointer over the hyperlink.
Hyperlink Builder displays the options you specified, as shown in Figure 11‑15. Choose OK.
Figure 11‑15 Linking to an external URL
Modifying a hyperlink
To modify a hyperlink, select and right‑click the report element containing the hyperlink. Choose Hyperlink. In Hyperlink Builder, modify the type of hyperlink and other options as needed. Choose OK.
The report element displays the modified hyperlink.
Deleting a hyperlink
To delete a hyperlink, select the report element containing the hyperlink, then select Hyperlink from the context menu. In Hyperlink Builder, in Hyperlink Type, select No link. Choose OK.
The report element no longer displays the hyperlink.