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.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值