Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Toggle between Chart and Tabular data
kclark
Synopsis:
Add a button to report which toggles between Chart and Tabular data
<br />
Essential:
This report was built using Actuate BIRT Professional 10sp1 and is designed to work<br />
when the report is run using the Interactive Viewer.<br />
<br />
Points of Interest in the implementation.
<br />
<br />
1) A text element is used to provide a bookmark so the getTextByBookmark('id') can correctly find<br />
the cell. Once the cell is found, we can hide/show all elements inside the cell. So you can host<br />
many elements inside the cell, not just a single chart or table.<br />
<br />
2) The main Table (Table_202) does not provide any data to the report.<br />
The charts bind to their own data source (MainData) even though they live inside Table_202.<br />
In fact Table_202 does not need to be bound to any query.<br />
The only reason Table_202 is in the report at all is that the code:<br />
var b1 = page.getTextByBookmark('id'); will only work correctly if the text element is inside a<br />
<br />
Table container. getTextByBookmark('id') does not work if in a List or a Grid.<br />
You need to bind Table_202 to a query else the designer reports an error each time you run the<br />
report. The red X circle appears in the Outline next to Table_202 which looks horrid.<br />
<br />
3) The hide/show cells need to be in the Footer of Table_202. Does not work if they are in the Header row.<br />
<br />
Keith Howard<br />
Actuate.
Find more posts tagged with
Comments
There are no comments yet