Dynamically Modifying the Parent Report
Scripts in a bean can dynamically access elements and variables in the parent report scope. For example, you could develop a “toolbar bean” that contains different chart type “buttons”. When the user clicks a button, this changes a chart in the parent report to the selected type. To do this, you could add an onClick Handler script to each button, such as the following:
// script for line chart button
Chart1.singleStyle['Count(Total)'] = Chart.CHART_LINE
This bean can then be embedded in any report that has a chart called 'Chart1'. The bean itself contains no chart called 'Chart1'; the server locates the parent report's 'Chart1' at runtime by looking up the name in the scope hierarchy.
| << Accessing Report Elements of Same Name | © 1996-2013 InetSoft Technology Corporation (v11.5) | Accessing Bean Properties from Parent Report >> |