tim.westhoff Posted April 18, 2016 Share Posted April 18, 2016 Hello,I’m using iReport 5.6.0 and I have two Text Fields. The first is listing my observers comma-separated. <textField isStretchWithOverflow="true" isBlankWhenNull="true"><reportElement mode="Transparent" x="239" y="155" width="244" height="15" uuid="7704e09f-2c07-4449-a326-72d05ab2964c"/><box leftPadding="5"><leftPen lineWidth="1.0" lineColor="#FF6600"/></box><textElement verticalAlignment="Middle"/><textFieldExpression><![CDATA[de.hlsolutions.taskworker.util.JsonUtils.collectionToCommaDelimitedString($F{observer}, ".user.display")]]></textFieldExpression></textField> The second one should show “no observers”, if there is no observer. <textField><reportElement x="239" y="155" width="244" height="15" uuid="f14b17fb-f479-44d4-8ef3-9f4ad16b1798"><printWhenExpression><![CDATA[$F{observer}.equals( null )]]></printWhenExpression></reportElement><box leftPadding="5"><leftPen lineWidth="1.0" lineColor="#FF6600"/></box><textElement verticalAlignment="Middle"><font isItalic="true"/></textElement><textFieldExpression><![CDATA[$R{task.filter.noObserver}]]></textFieldExpression></textField> I tried to achieve this with a Print when expression $F{observer}.equals( null ) but it’s not working because the other text field is never gone be null.I hope this will work with another Print when expression.Tank you :) Link to comment Share on other sites More sharing options...
tim.westhoff Posted April 21, 2016 Author Share Posted April 21, 2016 Print When Expression: $F{supporters}.isMissingNode()Thats it :) 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