Return value of subreport is null

Hi everybody,

I want to use the return value of a subreport into the master report, but the only thing that is shown is "null".  

I'd done the following:

Subreport


create variable "var_subreport" of type BigDecimal, Expression 2005, ResetType= None, IncrementType = None

Mainreport:
create variable "var_mainreport" of type BigDecimal, ResetType = None, IncrementType = None

In Mainreport in the subreport element I set up the following:

From variable: var_subreport
To Variable: var_mainreport
Calculation Type: nothing

The evaluation time of the text field that displayes the return value is set to Report.

I also want to use the value vor a subtraction. So the return value should be substracted from another value. But this also gives null.

Any hint to solve this is appreciated!



 

 

mpolo91's picture
38
Joined: Nov 30 2022 - 8:23am
Last seen: 1 month 1 week ago

2 Answers:

Can you change the calculation type to System and try again?

Also, refer to the answer from this thread that should help you with the steps:

https://community.jaspersoft.com/questions/536522/pass-value-subreport

JRS-SE's picture
5463
Joined: Oct 30 2017 - 12:56pm
Last seen: 1 day 4 hours ago

I change the calculation type of var_mainreport to System as descriped in the referenced topic, but it changed nothing. The return value is null, but normally 2005 should be printed.

I added the xml files. Maybe you can take a look and check whats going wrong?

 

 

 

mpolo91's picture
38
Joined: Nov 30 2022 - 8:23am
Last seen: 1 month 1 week ago
Feedback
randomness