Print when expression - when is evaluated?

Hello.

I am trying to display variable received from subreport in main report. To do that I create variable in main report and mapped it with the target variable from subreport and set "Report" evaluation time on the Text Field. Everithing is fine. But when trying to display the Text Field only when received variable is > 0 with expression: $V{variable1}.compareTo( java.math.BigDecimal.ZERO ) > 0 the result is unexpected for me, although $V{variable1} is > 0 it does not printed. I suppose that the reason is "Print When Expression" does not evaluated when "Text Field Expression" is evaluated.

Is that true?

And is there any way to change the time "Print When Expression" to be evaluated?

angel_ivanov's picture
Joined: Dec 18 2009 - 4:59am
Last seen: 2 years 5 months ago

3 Answers:

Try by setting the evalution time as "Band"

rakeshenoch's picture
Joined: Oct 14 2009 - 12:19pm
Last seen: 13 years 11 months ago

I found a solution.

I move subreport in Title band, and the Text Field with returned value in Summary band. Now everything works.

Thank you for the reply!



Post Edited by angel_ivanov at 12/21/2009 09:13
angel_ivanov's picture
Joined: Dec 18 2009 - 4:59am
Last seen: 2 years 5 months ago

angel_ivanov
Wrote:

I suppose that the reason is "Print When Expression" does not evaluated when "Text Field Expression" is evaluated.

Is that true?

For the record, that's correct.  The "print when" expression does not have delayed evaluation.

Regards,

Lucian

lucianc's picture
87137
Joined: Jul 17 2006 - 1:10am
Last seen: 18 hours 3 min ago

so there is no way to make a page header band not print on the last page? my assumption is that last page can only be known on the last page and "print when" from page header band can not be delayed based on what you wrote .... ((

tomkast_1 - 9 years 3 months ago
Feedback