Variable nesting depth limit

Jaspersoft Community 'Read-Only' as of July 8, 2022

Transition to New TIBCO Community Just Weeks Away

You can still search, review wiki content, and review discussions in read-only mode. Please email with questions or issues requiring TIBCO review or response.

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?

buzz-dee's picture
Joined: Sep 30 2013 - 12:38am
Last seen: 1 year 9 months ago

1 Answer:

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: 3 months 4 weeks ago

I updated my question, please see again.

buzz-dee - 7 years 9 months ago