问题
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