2001 JI Open Discussion Posted August 14, 2006 Share Posted August 14, 2006 By: Ryan Johnson - delscovich evaluationTime="Report" not working right? 2002-03-22 10:07Hi: When I try to use the following on a multi-page report, the field does not display at all, on any page. The idea was to have the information print on every page except the first: <textField evaluationTime="Report"> <reportElement ...> <printWhenExpression> new Boolean($V{PAGE_NUMBER}.intValue() != 1) </printWhenExpression> </reportElement> . . </textField> If I change the expression to "x == 0", "x == 1" or "x > 1", the field still doesn't print. However, "x > 0" prints the field on every page. It looks like the printWhenExpression is evaluated "Now", even when the field's evaluationTime="Report", which makes sense, but that the field only prints if the printWhenExpression evaluates to true every time. Am I doing something wrong, or is there a work-around? Thanks, Ryan By: Filip Tomisic - brlja77 RE: evaluationTime="Report" not working right? 2002-03-26 00:48Hi I use following work-around: <textField evaluationTime="Report"> <reportElement x="450" y="30" width="15" height="20"> </reportElement> <textElement textAlignment="Left"> <font size="10"/> </textElement> <textFieldExpression class="java.lang.Integer"> $V{PAGE_NUMBER} </textFieldExpression> </textField> <rectangle> <reportElement x="450" y="30" width="15" height="20" forecolor="#FFFFFF" backcolor="#FFFFFF"> <printWhenExpression>new Boolean($V{PAGE_NUMBER}.intValue() == 1)</printWhenExpression> </reportElement> <graphicElement stretchType="NoStretch"/> </rectangle> Simply, putting a background colored rectangle on a same position but with <printWhenExpression>new Boolean($V{PAGE_NUMBER}.intValue() == 1)</printWhenExpression> will overwrite textfield on first page. Not an elegant solution, but it works. By: Teodor Danciu - teodord RE: evaluationTime="Report" not working right? 2002-06-12 04:08 Hi, This bug was corrected in the new 0.3.2 version. Thank you, Teodor Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now