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

标签 java jakarta-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报告中显示这些数据?

最佳答案

您可以分配属性可见性

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

当表达式计算结果为 true 时,元素被隐藏。

看看这个教程

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

关于java - 根据 birt 报告中的 if 条件显示数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12818203/

相关文章:

java - Servlet 3.1 与 Servlet 3.0 有何不同

reporting - 在报告中为 icCube 事件分配值

SQL Server 2008R2 SSRS报告无法连接到数据源: Cannot create a connection to data source

linux - java运行jar文件失败不退出回提示

java - 基于复杂匹配键的多个属性分组和聚合

java - 在 memcached 之前使用 ehcache

java - 如何将 Google Visual API 图表嵌入到 JasperReports 中?

javascript - 使用数据网格功能创建可移植的 HTML 报告

java - 在 TreeSet 中查找以给定前缀开头的字符串

java - 在selector.selete()之后,selectedKeys()返回空