问题
I have sub Dataset that include a calculated variable that I want to show in the report. But when dragging and dropping this variable into the report the following message appears:
You drop an object from a subdataset to the report, this is not possible.
How to overcome that?
回答1:
There is a solution which is already posted at - Solution-1
However, I am posting a set of screenshots to demonstrate the same from UI -
- Define
var
in the main data set - Note - Calculation should be set toSystem
- Define another
variable
in the sub data set - - Select the sub data set element ( it is a table in the example) and create
Return Values
mapping - - In the report, drag and drop
variable
defined in the main data set and ensure the evaluation is set toReport
-
And that should do it!!
来源:https://stackoverflow.com/questions/58181821/how-to-add-variable-from-subdataset-to-report-jasper