jing_3 Posted March 27, 2020 Share Posted March 27, 2020 Hi guys, I having a problem to hide the details band. I have two Items, one have single value and the other one have multiple values. I want to hide the one only contain single value. but the multiple value data should show details on details band. https://gyazo.com/66478688cfb0bb0accc4be1e40232d78I want to hide the detail for item 335 only. Please help !! Link to comment Share on other sites More sharing options...
I am Leo Posted March 30, 2020 Share Posted March 30, 2020 Can you show me the code of that block? Link to comment Share on other sites More sharing options...
jing_3 Posted March 30, 2020 Author Share Posted March 30, 2020 <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 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