JSAPI is a great API to embed BIRT reports in a mashup page, but its capabilities go far beyond just creating a mashup page. The API comes with a slew of features, including the ability to add a filter to any table in a BIRT report, and have the filter applied in real-time, without re-querying the database.<br />
In this example we have a bar chart for total sales by country. On the chart's value series, we add interactivity to filter data in a table for the given country that was clicked. The actual code to make this happen is:
var table = actuate.getViewer(evt.srcElement || evt.target).getCurrentPageContent().getTableByBookmark();
table.setFilters(new actuate.data.Filter("COUNTRY", "eq", categoryData));
table.submit();
<br />
A quick breakdown of the code. First we need to get a handle on the Actuate JSAPI viewer object, by calling actuate.getViewer() and passing the handle of an HTML element, in this case, we are passing the chart object, which can be referenced via the browser's event object passed into the script. Once we have a handle on the viewer, we can get a handle on the Table we wish to modify, by calling getTableByBookmark(). This method does optionally take a bookmark name, if none is specified the first table is retrieved. Next we set a filter on the table, and submit the table for processing.<br />
A sample report is attached, with well commented code. The code can be found in the Chart's Value Series Interactivity screen.