NP16 Posted April 29, 2020 Share Posted April 29, 2020 HI,could any one give an advise of how to add a row dynamically , ie only add row if user selects Yes to a question .at moment we are adding the rows as static text, below is the current code , so i should only add 'Question 1 user has to select Yes or no' only when user selects Yes.thank you<band height="19" splitType="Stretch"> <property name="com.jaspersoft.studio.unit.height" value="px"/> <staticText> <reportElement style="FieldText" x="5" y="2" width="208" height="15" uuid="623b92e4-17b8-40b5-bb80-f99bf3550c71"> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="com.jaspersoft.studio.unit.y" value="px"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> </reportElement> <text><![CDATA[Question 1 user has to select Yes or no]]></text> </staticText> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement style="FieldText" x="224" y="2" width="137" height="15" isRemoveLineWhenBlank="true" uuid="272896e9-5708-401b-9f20-2b0a7dba63d9"> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="com.jaspersoft.studio.unit.y" value="px"/> <property name="com.jaspersoft.studio.unit.x" value="px"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> </reportElement> <textElement textAlignment="Left"/> <textFieldExpression><![CDATA[$F{_THIS}.getLaaAcquisition()]]></textFieldExpression> </textField> <line> <reportElement style="Line_TableWeak" stretchType="RelativeToBandHeight" x="218" y="0" width="1" height="19" forecolor="#B8B8B8" uuid="e5fc2804-77fe-4587-b61e-db82d48c43b1"> <property name="com.jaspersoft.studio.unit.x" value="px"/> <property name="com.jaspersoft.studio.unit.y" value="px"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> </line> </band> Link to comment Share on other sites More sharing options...
mlopez_1 Posted April 29, 2020 Share Posted April 29, 2020 Add new detail band and set Print when expression to print only when condition applyMariano 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