Print when expression - when is evaluated?
Posted on December 18, 2009 at 5:16am
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?
Joined: Dec 18 2009 - 4:59am
Last seen: 2 years 5 months ago
Posted on December 20, 2009 at 9:47pm
Try by setting the evalution time as "Band"
Joined: Oct 14 2009 - 12:19pm
Last seen: 13 years 11 months ago
Posted on December 21, 2009 at 1:11am
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
Joined: Dec 18 2009 - 4:59am
Last seen: 2 years 5 months ago
Posted on December 22, 2009 at 7:07am
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
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 .... ((