Variable nesting depth limit

0

Is there a variable nesting depth limit in iReport, Jaspersoft Studio etc.?

I have text field with the following content.:

( $F{tckopf_R_ART}.equals( "1" ) && $V{euroFollowOnCommission} != null )
? $V{charterEuroWorth} + $V{euroFollowOnCommission}
: ( $F{tckopf_R_ART}.equals( "2" ) && $V{euroFollowOnCommission} != null )
? $V{charterEuroWorth} + $V{euroFollowOnCommission}
: ( $F{tckopf_R_ART}.equals( "1" ) && $V{euroFollowOnCommission} == null )
? $V{charterEuroWorth}
: ( $F{tckopf_R_ART}.equals( "2" ) && $V{euroFollowOnCommission} == null )
? $V{charterEuroWorth}
: null

where are "charterEuroWorth" and "euroFollowOnCommission" variables are sum calculazions from 2 different subperiods.

If I put above code to a new variable in the main report, I get "null" in the text field on the main report. I need to put it in variable in the main report, because also need to calculate the sum value from the above code for every record in the main report.

I don't know how, I can achieve it. Maybe there is a problem with the variable properties? Please let me know, if you need further information.

How can I calculate the sum value from the above code for every record in the main report?

deezzub's picture
Joined: Sep 30 2013 - 12:38am
Last seen: 4 years 10 months ago

1 Answer:

0

I don't think there is any limit to nesting variables in jrxml, because it gets compiled to .jasper files, which are in essence just compiled java code. I don't see any inherent limitations here. It is possible that iReport or JasperStudio can only handle so much depth before it gets lost in the complexity, so the editor may give you trouble. 

 

 

 

 

darth_fader's picture
Joined: Mar 7 2010 - 9:45pm
Last seen: 1 week 2 days ago

I updated my question, please see again.

deezzub - 5 years 1 month ago
Feedback
randomness