adnanmuttaleb
adnanmuttaleb

Reputation: 3624

How to add variable from subdataset to report? [Jasper]

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?

Upvotes: 1

Views: 5373

Answers (1)

Mukesh Sharma
Mukesh Sharma

Reputation: 71

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 -

  1. Define var in the main data set - enter image description here Note - Calculation should be set to System
  2. Define another variable in the sub data set - enter image description here
  3. Select the sub data set element ( it is a table in the example) and create Return Values mapping - enter image description here
  4. In the report, drag and drop variable defined in the main data set and ensure the evaluation is set to Report - enter image description here

And that should do it!!

Upvotes: 3

Related Questions