| 1. | Create an empty report using the Sample DB data adapter and the query: |
SELECT * FROM ORDER
| 2. | Add an HTML5 Bar chart to the title band. |
| 3. | Double click the chart to access the chart configuration, click the Chart Data tab and select the Configuration sub-tab to setup the multi-dimensional dataset. |
| 4. | Modify the Level 1 category by renaming it Country and setting the Expression to |
$F{SHIPCOUNTRY}
|
Editing Categories in the Chart Data Configuration Window |
| 6. | On the Configuration tab of the Chart Properties dialog, select the default value in Measures and click Modify. |
| 7. | Change the measure to count the number of orders as shown below: |
|
Editing the Measure to Count Orders |
At this point the chart is configured, run the report to test it.
|
Successful Test of the Example Report |
Now, let's configure the hyperlink.
| 9. | In design mode, double click the chart and again click the Chart Data tab and select the Configuration sub-tab. |
| 10. | Select the measure # of orders for editing. |
|
Editing the Number of Orders a Second Time |
| 11. | Click Advanced properties, then the Hyperlink button. |
Jaspersoft Studio creates the hyperlink's basic property configuration: hyperlinkType, hyperlinkTarget, and hyperlinkReference.
| 12. | Double-click hyperlinkReference. You'll see the Edit property dialog, which defaults to a constant: http://www.jaspersoft.com |
Click OK.
|
Editing the Property Definition for hyperlinkReference |
| 13. | Preview your chart using the interactive report viewer to see that the columns are actually clickable and point to http://www.jaspersoft.com |
|
Previewing the Report |
Property values can come from a static value, a bucket property value (explained in Working with Bucket Properties and Hidden Measures) or from the value of a measure (which lets us create values for our hyperlink, like the URL, combined with using hidden measures, to create an interesting user experience).
Recommended Comments
There are no comments to display.