根据用户输入显示/隐藏 Pentaho 报告中的字段 [英] Show / Hide Fields in Pentaho Report Based on User Input

查看:44
本文介绍了根据用户输入显示/隐藏 Pentaho 报告中的字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试根据用户输入在 Pentaho 报告中显示/隐藏字段.

I'm trying to show / hide fields in a Pentaho report based upon user input.

例如,我想为用户提供一个复选框,说显示产品计数"——如果未选中该框,则报告中不会包含该列.

For example, I would like to offer a checkbox to the user saying "Show Product Count" -- if the box is unchecked, it will not include that column in the report.

有没有办法在 Pentaho Report Designer 中做到这一点,也许使用参数?

Is there a way to do this in Pentaho Report Designer, perhaps using Parameters?

感谢您的帮助-莫妮卡

推荐答案

是的,你有一半的答案.有一个是/否参数ShowProductCount"

Yes, you have half the answer. Have a Yes/No Parameter "ShowProductCount"

然后在条件字段上,转到可见属性,单击 + 公式图标并输入:

Then on the conditional fields, go to the visible property, click the + formula icon and enter:

=IF([ShowProductCount]="Yes"; TRUE(); FALSE())

=IF([ShowProductCount]="Yes"; TRUE(); FALSE())

简单!:)

这篇关于根据用户输入显示/隐藏 Pentaho 报告中的字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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