How to pass a variable obtained from query component into a query on Pentaho CDE?

流过昼夜 提交于 2019-11-30 09:57:15

问题


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:

On Query Component: myresult='NYC' in my example.

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.

I also tried with

> 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/////////////////////////////

On Component Panel - simple parameter :

On Component Panel - Pie chart - Parameters :

On Component Panel - Pie chart - listeners : I selected param_city

On Datasource - parameters of piechart query:


回答1:


you need to pass parameter myresult and listner in Parameters field of both chart and datasource used for chart.



来源:https://stackoverflow.com/questions/57611878/how-to-pass-a-variable-obtained-from-query-component-into-a-query-on-pentaho-cde

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!