Tutorial 3: Adding an interactive chart filter to a BIRT report
In this tutorial, you add an interactive chart control to a BIRT report design that implements a filter on the other charts in the report design. You perform the following tasks:
In this task, you preview a report called InteractiveChartandTable.rptdesign and add a bookmark to the chart and table.
1 In Navigator, open InteractiveChartandTable.rptdesign.
2 Choose Run➛View Report➛In Web Viewer to view the report, as shown in Figure 42‑24.
3 Choose Layout to return to the layout editor.
Figure 42‑24 Previewing the report
4 Select the chart entitled Sales by Quarter. In the property editor, open Properties➛Bookmark. Set the bookmark value to "SalesChart", as shown in Figure 42‑25.
Figure 42‑25 Setting the chart bookmark property
5 Repeating the process of step 5, for the table entitled Product Line, set the bookmark value to "ProductTable".
Task 2: Add a filter script to chart interactivity
In this task, you add a filter script to the Sales by Quarter chart to affect the other charts.
1 Double-click on the Sales by Quarter chart. In Edit Chart, select Format Chart➛Series➛Value (Y) Series. Then choose Interactivity.
2 On Series Interactivity, select Mouse Click for event, and Invoke Script for action, as shown in Figure 42‑26.
Figure 42‑26 Interactivity settings for invoking a script on mouse click
3 In the Script text box, add the following code:
var atable = actuate.getViewer(evt.srcElement || evt.target)