根据birt报告中的条件显示数据

时间:2012-10-10 11:26:27

标签: java java-ee reporting birt

我需要根据if condition中的birt report显示几个值。有没有办法做到这一点?
我使用XML作为datasource,因此如果标记不为空,我想在报告中显示它。
这是我需要在报告中添加的xml示例

<wr:if><wr:out/></wr:if><wr:if><wr:out/></wr:if><wr:if><wr:out/></wr:if>

此处<wr:out/>对应于我用作数据集的XML标记。

我想知道如何在birt报告中显示这些数据?

1 个答案:

答案 0 :(得分:0)

您可以指定属性可见性

<list-property name="visibility">
  <structure>
     <property name="format">all</property>
     <expression name="valueExpr" type="javascript">your evaluation here</expression>
  </structure>
</list-property>

当expression的计算结果为true时,该元素将被隐藏。

看一下本教程

http://digiassn.blogspot.com.au/2007/03/birt-hide-report-table-when-no-data-is.html

相关问题