如何在 CDE 中添加全选选项以选择组件 [英] How to add a select all option to select component in CDE

查看:11
本文介绍了如何在 CDE 中添加全选选项以选择组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于学生项目,我们正在与 Pentaho CDE 合作创建仪表板.起初它工作正常,但现在我们正在添加多个选择组件.我们将选择组件的参数插入到 Where 语句中的 SQL 查询中,但现在我们遇到了问题,即不可能在一个选择组件中选择所有元素,而在其他选择组件中只选择一个.我们添加的参数越多,样本空间就越小,因为我们无法找出如何在一个选择组件中选择所有选项并将其全部发送到查询.是否可以在 CDE 中向选择组件添加选择所有元素选项"?或者甚至停用选择组件并将此停用发送到 SQL 查询?

for a students projects we are working with Pentaho CDE to create a dashboard. At first it works fine, but now we are hanging at the point adding more than one Select Component. We inserted the Parameters of the Select Components to the SQL-Queries in the Where statement but now we have the problem, that it is not possible to select all elements in one select component and only one in the others. The sample space is getting smaller and smaller the more parameters we add because we can't find out how to select all option in one select component and send this all to the query. Is it possible in CDE to add an "select all elements option" to the select component? Or even to deactivate a select component and send this deactivation to the SQL-Query?

我们注意到有一个多选组件,但我们无法处理它所需的自定义参数.如果它可以与选择组件一起使用就可以了.

We noticed that there is a multiple select component but we were not able to handle the custom parameter needed for it. It would be fine if it works with the select components.

提前感谢您的支持.

推荐答案

使用SQL表达式CASE:

Use SQL expression CASE:

SELECT * FROM table WHERE城市 LIKE(如果 ${city} = 'ALL' 然后 '%' ELSE ${city} 结束)

SELECT * FROM table WHERE cities LIKE (case when ${city} = 'ALL' then '%' ELSE ${city} end)

这篇关于如何在 CDE 中添加全选选项以选择组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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