iReport:使用变量 [英] iReport: Using Variables

查看:513
本文介绍了iReport:使用变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 iReport 的新手并尝试以下方法:
我想要报告当特殊字段具有另一个值时,在详细信息带中注意,因为它具有之前的条目。
我认为如果我使用变量可能是可能的,但我不知道如何做到这一点。
有人可以通过示例帮助我,这样我就能看到正确的语法吗?

I'm new with iReport and trying the following: I want the report to notice in the detail-band when a special field has another value as it has the entry before. I think that could be possible if I use a variable but I have no idea how to do that. Can someone help me out with an example so I can see the right syntax?

我试图创建一个参数 $ P { MyField} 并在打印时间中填写如下声明:

I tried to create a parameter $P{MyField} and fill it with a statement in the "Print when" like this:

($P{MyField}.put("MyField", $F{MyField}) == null  ) ? Boolean.FALSE:Boolean.FALSE

我发现在另一个报告中想要使用它...

I found that in another Report and wanted to use it...

参数设置为

java.util.Map 

默认

new java.util.HashMap()

我想我完全错了..那么,如果有人可以提供帮助?

I think I'm totally wrong... so if someone could help?

推荐答案

您可以添加一个矩形,例如,使用特殊样式,并设置条件在属性打印时表达,所以特殊的矩形只会在真正应该打印时。

You can add a rectangle, for example, with a special style, and set the condition at the porperty "print when expression", so the special rectangle would only be printed when it really should be.

这篇关于iReport:使用变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆