`
leng_cn
  • 浏览: 298158 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

how can i inser script code in BIRT

阅读更多
I am using BIRT in our project. That has a requirement is dynamic display three different kind of graph and switch between different graph. It is my first time to use BIRT. So I don’t know how to control the chart in our report of BIRT. I found a document of BIRT introduced how to insert script code in the report scope. The detailed description following:
The First: I defined a table element that has two rows and columns.

The Second: in the first row and first column. I insert the text element and choice the element type is HTML, so you can edit html element, such as I insert three “input” element of html, its type is radio. When I click one of three radio elements, a kind of graph will be shown and the others will be hidden. So you must defined row and column “bookmark” property. You can use the bookmark in your script, like this “document.getElementById(“bookmark”)”,obtain the element object.

Third: edit your script code, like following:

function DisplayCustomer(id0,id1,id2) {

document.getElementById("chart"+id0).style.display="block"
document.getElementById("chart"+id1).style.display="none"
document.getElementById("chart"+id2).style.display="none"

}
Fourth: through the above code display or hidden the different graph.
分享到:
评论
2 楼 leng_cn 2010-12-08  
jquery只能让你成为一个工具使用的奴隶,没啥好的,还是老实的学写低层的东西,
了解原理吧
1 楼 woxiangbo 2010-12-03  
貌似 JQuery 能极大的简化这一切~

相关推荐

Global site tag (gtag.js) - Google Analytics