读书人

birt 使用

发布时间: 2012-07-01 13:15:00 作者: rapoo

birt 应用

1.birt头斜线

http://www.birthome.com/read.php?tid-1170.html

?

?

2.交叉报表 表头多一行
http://www.birthome.com/read.php?tid-2382.html

?

?

3.交叉报表中,count 的字段为空 怎么默认为0?

点击交叉表,脚本,onprepare中添加下面一段js,则空的字段默认都为0


/**
?* Called when crosstab is being prepared.
?*
?* @param crosstab
?*??????????? ICrosstab
?* @param reportContext
?*??????????? IReportContext
?*/

function onPrepareCrosstab( crosstab, reportContext )
{
? crosstab.setEmptyCellValue("0");
}

?

?

4.数据库多用数字表示意思,在输出到报表时需要做转化。

点到字段上,脚本? ,onCreate 中添加如下:

当为0或1时,取资源文件想对应字段

if(this.getValue() == 0)
{
?? this.setDisplayValue(reportContext.getMessage("ph.product.type.base", reportContext.getLocale()));
}else
{
?? this.setDisplayValue(reportContext.getMessage("ph.product.type.increment", reportContext.getLocale()));
}

?

?

5.图表中的基准线 设定

?? 点击? 图表格式-- Y轴 -- 标记 -- 添加线条

读书人网 >行业软件

热点推荐