I'm using TIBCO Jaspersoft® Studio 6.3.1 final. I'm trying to create a report using two datasources (the format is JSON).
The structure of JSON is like:
{
"first":
{"parameter1" : 123},
"second":[
{"key" : 1},
{"key" : 2}
]
}
So I have two datasources. One for the first object (firstSource) and another (secondSource) for second object (array of objects).
The array (second) is printed in the table component. I'd like to access a field from first object (first.parameter1) and print it in the table header.
The table is using this dataset:
<datasetRun uuid="4ee63b06-f4ee-45b4-9da8-3dabc3e7a09d">
<dataSourceExpression> <![CDATA[$P{secondSource})]]></dataSourceExpression>
</datasetRun>
Then I'm printing its fields using $F{key}
.
Do you know how can I access the parameter1 of the first object from table? Maybe using some sort of $V{} variable or merging both datasources?
I tried to use subDataSource and subDataSet approach without any luck.
Here's something I'd like to achieve in the result table: