如何根据参数输入在Jasper Reports中显示不同的报告?(How to display different reports in Jasper Reports based from param

编程入门 行业动态 更新时间:2024-10-27 23:24:02
如何根据参数输入在Jasper Reports中显示不同的报告?(How to display different reports in Jasper Reports based from parameter input?)

我想知道是否可以使用参数显示不同的结果(报告)。 假设参数取2个值。 选项1显示1个报告,而选项2显示不同的报告。 感谢您的意见。

I was wondering if it is possible to display different results(reports) using a parameter. Let's say the parameter takes 2 values. Option 1 displays 1 report while option 2 displays a different one. Appreciate for your input.

最满意答案

相反,尝试将两个不同的内容放在一个报告中。 假设将报告1内容放入单个帧(Frame1),将Report2内容放入另一个帧(Frame2)。 现在尝试使用print条件来显示基于参数的动态内容

对于Frame1

$ P {Paramter1}!= null && $ P {Parameter} == null

对于Frame2

$ P {Paramter1}!= null && $ P {Parameter}!= null

希望这可以解决你的问题。

Instead, try to put your two different content into a single report. Say put report 1 content into a single frame (Frame1) and Report2 content into another frame (Frame2). Now try using print when condition to display your dynamic content based on the parameter as

for Frame1

$P{Paramter1} != null && $P{Parameter} == null

for Frame2

$P{Paramter1} != null && $P{Parameter} != null

Hope this should solve your problem.

更多推荐

本文发布于:2023-08-04 21:54:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1422346.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:参数   报告   Jasper   Reports   display

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!