Crystal Reports 10: Adding a Hyperlink to a Report
One of the most valuable features of Web-based content is the capability to quickly move between pages by using hyperlinks. By clicking a hyperlink associated with a word, a phrase, or an image, you can instantly display a new page that provides more detail.
Crystal Reports enables you to add hyperlinks to your reports without your having to become a HTML scripter. Here’s how to do it:
1. In your report, select the object that you want to turn into a hyperlink and then click the Insert Hyperlink icon on the Expert Tools toolbar. (Or right-click the selected object and choose Format Field.)
The Hyperlink tab of Format Editor appears. If the Hyperlink icon on the Expert Tools toolbar appears dimmed, you can’t use the object you selected as a hyperlink.
2. Select the type of hyperlink that you want.
3. To link to a Web site, type a Web site address in the Hyperlink Information box.
4. Click OK.
You can link to several places other than Web sites. Here’s a brief description of the options available:
- No Hyperlink: Removes a hyperlink from the selected object.
- A Website on the Internet: Links to a Web site.
- Current Website Field Value: Select this when you want to link to the URL contained as a value in the selected object. This option appears dimmed if no URL is contained as a value in the selected object.
- An E-mail Address: Enables users to send e-mail messages to a recipient that you specify.
- A File: Links to a file on the user’s computer.
- Current E-mail Field Value: Select this when you want to send an e-mail message to the address contained as a value in the selected object. This option appears dimmed if no address is contained as a value in the selected object.
- Report Part Drilldown: Specifies which detail object is displayed when the user drills down on a report part. (Report parts are explained in the next section.) This type of hyperlink works only with DHTML viewers such as Internet Explorer 4.0 and above or Netscape Navigator 4.72 and above.
- Another Report Object: Links directly to the object that the user specifies. The destination object may be in this report or in another report. Details are up next.
To link to a Web site on the Internet, follow these steps:
1. Open the source report and select the object that you want as the originator of the hyperlink.
2. Click the Insert Hyperlink icon.
The Hyperlink tab of Format Editor appears.
3. In the Hyperlink Type area, select A Website on the Internet.
4. In the Hyperlink Information area, fill in the URL of the Web site to which you want to link.
5. Click OK to establish the link.
Now when the cursor hovers over the source object, it turns into the hyperlink hand. Clicking the source object launches your default browser and displays the target Web site.