5.3.1 Creating a Hyperlink to a Report or Viewsheet
In this example, you will create a Viewsheet containing the 'Customer' table from 'Order Model', and add hyperlinks to the 'Company' attribute. The 'Company' attribute contains the names of companies, and the company names will be hyperlinked to the appropriate company-specific information in the 'OrderList' report (in the classes/inetsoft/demos directory).
Walkthrough
The 'OrderList' report is designed to accept five parameters, one of those being 'customer,' which represents the company name of the customer. You will configure the hyperlinks that you add to the 'Customer' > 'Company' attribute in the Viewsheet to pass the company name into the 'OrderList' report's 'customer' parameter.
1. In the Visual Composer, create a new Worksheet. (See the Data Mashup for information on creating a Worksheet.)
2. From the 'Order Model' data source, drag the 'Customer' table onto the Worksheet.
3. Save the Worksheet as 'HyperlinkExample'.
4. Create a new Viewsheet in Visual Composer using the saved 'HyperlinkExample' Worksheet. (See Quick Start: Creating a Viewsheet for information on creating a Viewsheet.)
5. From the 'HyperlinkExample' Worksheet listed in the 'Component' pane of 'Visual Composer', drag the 'Customer1' table onto the Viewsheet.
6. Save the new Viewsheet as 'HyperlinkExampleView'.
Add hyperlinks to the names in the 'Company' column. These hyperlinks will pass the company name as parameter to the 'OrderList' report. Follow the steps below:
7. Right-click any cell in the 'Company' column, and select the 'Hyperlink' option.

8. This opens the 'Hyperlink' dialog box for the 'Company' column.
9. In the 'Hyperlink' dialog box, click the 'Asset Link' radio button.
10. Select 'OrderList' from the 'Link' menu.
11. Optional: Enter a tooltip in the 'Tool Tip' field. (In the example we use “View company information” as the tooltip.)
The tooltip is displayed when the end-user hovers the mouse over a hyperlink. If there are multiple hyperlinks for a given attribute (which may be due to auto-drills added at the model level or query level), the tooltip is displayed when the end-user hovers the mouse over the name of the hyperlink in the menu of hyperlink options.
12. Deselect the 'Self' option, and enter the name “ReportFrame” in the 'Target Frame' field.
This will cause the hyperlinked report to open in a window called “ReportFrame” (i.e., this is the browser DOM 'name' attribute). If you want the report to open in the original Viewsheet frame, replacing the Viewsheet, leave the 'Self' checkbox selected.


13. Press the 'Add' button next to the bottom panel. This opens the 'Parameter' dialog box.
14. Select the 'customer' parameter in the 'Name' menu. This is the name of the target parameter in the OrderList report.
15. Select the 'Company' field from the 'Value' menu. This is the name of the table column whose value should be passed into the report parameter when the user clicks the hyperlink.

16. (Optional) Enable 'Send viewsheet parameters' to pass all existing viewsheet parameters to the drill-down report, Viewsheet, or URL. The viewsheet parameter names must exactly match those defined in the target report, Viewsheet, or URL. See Defining and Editing Report Parameters in Report Design, and parameter in Dashboard Scripting, for more information.
17. (Optional) Select 'Disable parameter prompt' to suppress the parameter dialog box ordinarily produced by the drill-down report upon launch. (Prompting is automatically suppressed for parameters passed in the hyperlink itself.)
18. (Optional) Select 'Send selections as parameters' to send the values of any Viewsheet Selection components (Selection Lists, Range Sliders, etc.) to the target report. These values are passed into parameters in the target report that have the same name as the Selection component. For example, a Selection List named “EmployeeList” will pass its selected values into a parameter called 'EmployeeList' if one exists in the drill-down report.
19. Click 'OK' to complete the hyperlink configuration.

To display hyperlink underlining by default, set hyperlink.indicator=true in sree.properties.
20. Add any desired visual formatting to the hyperlinks (e.g., underlining).
21. Save the Viewsheet.
When the user views this Viewsheet in the User Portal, they will now see hyperlinks on all the names in the 'Company' column. (The 'State' column also shows hyperlinks because this attribute was pre-configured with an auto-drill.) Clicking one of the 'Company' hyperlinks launches the 'OrderList' report in a new browser window, and the 'OrderList' report now displays only the orders for the specific company clicked.

See Also
pviewsheet, in Dashboard Scripting, for information on how to access properties of a parent Viewsheet from within a hyperlinked report or Viewsheet.
parameter, in Dashboard Scripting, for information on reading and writing Viewsheet parameters.
Parameterization, in Report Design, for information on configuring report parameters.
| << 5.3 Hyperlinks | © 1996-2013 InetSoft Technology Corporation (v11.4) | 5.3.2 Creating a Hyperlink to a Web Page >> |