I am using pentaho report and I need to use several queries exactly the same but with different values. (The fields are the same, their values are not) I have tried to use a subReport to which I assign the second query, but the result is that for each row of the master report it makes me all the rows of the subReport.
I put the subReport in the details of the main report.
I also put the fields of the subReport in the detail of the subReport.
What I need is a report that goes something like this
Consulta1 Consulta2
2017 2020
2034 3323
I have tried to make a formula with this value =MULTIVALUEQUERY("miquery"
) but it only takes the first value of the query and repeats it to me as many times as the main query
Actually you can use
MULTIVALUEQUERY
, the difference withSINGLEVALUEQUERY
is that instead of returning a single value, it returns all the values of the list, (you can even define a limit of elements).Therefore with both you will only get the values of one column.
if your problem is:
It should only give you a value using
MULTIVALUEQUERY()
so you should check the query.In the end I have solved it with a
SINGLEVALUEQUERY("nombreConsulta")
, This selects only one field of there is its name. What I had wrong was the query, in the query I have put in the Where clause of the first query that the name field is the same as the name field of the second query. Final SL was about linking the two queries by name, which is the identifying field in my queries.