Can't get Return Values to work.

0

Using Jaspersoft Studio, I am trying to return a value from a subreport. Using the return values option for the sub report I type in the name of the variable from the subreport, the variable name on the main report and select nothing for the Calculation Type. Leave the incrementer blank. Click on finish and the return values field says there is one. Click off this and it says there are none, click back on it says there is one. Go to preview the report then I dont get the data and on returning to the design mode the return values have disappeared.

Is this a bug or am I doing something wrong. There seem to be people on this forum who are having success with return variables, so I think it must be something I am doing.

Any ideas?

Graham

 

 

grahamh's picture
Joined: Jan 18 2014 - 5:40pm
Last seen: 3 years 5 months ago

2 Answers:

0
  • Try to set the calculation type as System in the main report.
  • If the variable is received from the subreport in one band, it can be used in the main report in the next band only
madhukiran's picture
Joined: May 20 2009 - 1:53am
Last seen: 11 months 3 weeks ago
0

Thanks I eventually got it to work, but unfortunately don't know exactly what I did to get it to work. However it seems to work better if I use the button labelled Return Values in the Subreport properties (rather than in the Advanced Properties). 

Anyway with a bit of perseverance I now have a report that is displaying exactly what I wanted.

 

Graham

 

 

grahamh's picture
Joined: Jan 18 2014 - 5:40pm
Last seen: 3 years 5 months ago

I can confirm this. Your two hints together solve the issue, seems like the advanced property is buggy. This bug should be reported.

The Dentist - 5 years 8 months ago
Feedback
randomness