如何将从查询组件获得的变量传递到Pentaho CDE的查询中? [英] How to pass a variable obtained from query component into a query on Pentaho CDE?
问题描述
我设法通过Query component
将数据作为变量获取.
现在,我想将此变量传递给查询.
这是我所做的:
I managed to get data as variable with Query component
.
Now I want to pass this variable into a query.
Here is what I did:
在查询组件上:在我的示例中,myresult ='NYC'.
On Query Component: myresult='NYC' in my example.
对数据源的查询:我使用此查询来显示图表,当我将$ {myresult}更改为"NYC"时,它可以正常工作.但是使用$ {myresult},则不会显示该图表.
The query on Datasources: I use this one to display a chart, when I change ${myresult} to 'NYC', it works fine. But with ${myresult}, the chart is not displayed.
我也尝试过
> Dashboard.setParameter()
在获取查询组件后,但仍然相同...
On post fetch of Query Component, but still the same...
我还创建了简单的参数并选择了参数(该参数未显示在仪表板上),但不能解决问题.
I also created simple param and select param (which is not displayed on dashboard) but it doesn't solve the problem.
已经困了几个小时,很想得到一些帮助!
It's been hours I'm stuck , would love to get some help!
///////////////////////////////EDITED/////////////////////////////
在组件面板上-简单参数:
在组件面板上-饼图-参数:
在组件面板上-饼图-听众:我选择了param_city
On Component Panel - Pie chart - listeners : I selected param_city
在数据源上-饼图查询的参数:
推荐答案
您需要在参数的 Parameters 字段中传递参数 myresult 和 listner 图表和用于图表的数据源.
you need to pass parameter myresult and listner in Parameters field of both chart and datasource used for chart.
这篇关于如何将从查询组件获得的变量传递到Pentaho CDE的查询中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!