Jump to content
We've recently updated our Privacy Statement, available here ×

How to hide details only if there is a single value


jing_3

Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

    <detail>
        <band height="15">
            <property name="com.jaspersoft.studio.unit.height" value="px"/>
            <printWhenExpression><![CDATA[$F{Color}  !=  null && !$F{Color}.isEmpty()]]></printWhenExpression>
            <textField>
                <reportElement mode="Opaque" x="0" y="0" width="226" height="15" backcolor="#D1D1D1" uuid="1eda2882-4f8a-4671-8ced-94b745d301eb">
                    <property name="com.jaspersoft.studio.unit.height" value="px"/>
                    <property name="com.jaspersoft.studio.unit.y" value="px"/>
                </reportElement>
                <textElement verticalAlignment="Middle">
                    <font fontName="Arial"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{Color} + " / " + $F{Size}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement mode="Opaque" x="149" y="0" width="100" height="15" backcolor="#D1D1D1" uuid="9c6c5d40-5289-44f4-aaae-9394c07f22a9">
                    <property name="com.jaspersoft.studio.unit.height" value="px"/>
                    <property name="com.jaspersoft.studio.unit.y" value="px"/>
                </reportElement>
                <textElement verticalAlignment="Middle">
                    <font fontName="Arial"/>
                </textElement>
                <textFieldExpression><![CDATA[$V{Sub_Stock}]]></textFieldExpression>
            </textField>
        </band>
    </detail>

 

 

Right now, I just set the condition to $F{Color}  !=  null && !$F{Color}.isEmpty(), but what I really want is to hide data that only contains single values.

Thanks

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...