Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (20.5 KB, 5 trang )
10.7 Create an Onscreen Report That Contains Hyperlinks
My user has a text field in his Customers table that is actually customers' Web sites.
Users want to be able to access the site as a hyperlink on an onscreen report. How can I
use Crystal Report to create a report that uses hyperlinks?
Technique
For this How-To, you won't be doing coding. You'll just adjust the formatting of a report
field to tell it that it needs to treat the field like a hyperlink. Before doing this, you need
to modify Northwind.
Adding a Web Site Field to Northwind
To accomplish this, you open the Northwind database in the Server Explorer. You then
add a field called Website to the Customers table, with the Data Type of nchar and a size
of 50.
You then modify the first two records in the Customers table so that the Website field
contains www.appsplus.com and www.microsoft.com respectively, as shown in Figure
10.26.
Figure 10.26. These will be displayed as hyperlinks on the new report you will
create.
Now you are ready to create the report.
Telling the Report That a Field Is a Hyperlink
You create a simple report that is based off the Customers table and contains the fields
CompanyName, ContactName, and Website. Then you right-click on the Website field in
the report and choose Format. The Format dialog box opens, where you can click on the
Hyperlink tab. For the hyperlink type, you should choose Current field value (see Figure
10.27).
Figure 10.27. These are the options that you can have for hyperlink actions.
Now that you have told the field to act like a hyperlink, you need to have it look like one.
To perform this task, you set the following properties:
•