The requirement is to have some questions displayed to the user but the options can be dynamically hidden on the basis of a flag which i am using in "printWhenExpression" property of the frames and also I am using "isRemoveLineWhenBlank" property to hide the frames. It is working fine in some parts of the report as expected. However, In this report this seems to be problematic only after a certain question.
It would be of great help, if someone can point out the bug in my code which will help me fix the issue.
For some context, this is a sub-report rendered inside another report.
Here is the screenshot:
Here is the code:
Â
<?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.15.0.final using JasperReports Library version 6.15.0-dd49bfb94918336b8321d5507193f0169ead4e95 --> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="RiskToleranceSubReport" pageWidth="555" pageHeight="842" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="6913e860-ffe3-4d8a-8ecf-6045f62d06b8"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <import value="de.company.swb.core.pdf.util.JaspersoftPdfUtil"/> <template><![CDATA["jasper-report/styles/WphgStyle.jrtx"]]></template> <parameter name="riskTolerance" class="java.util.HashMap" isForPrompting="false"/> <parameter name="wphgStatus" class="java.lang.String" isForPrompting="false"/> <queryString> <![CDATA[]]> </queryString> <title> <band height="368" splitType="Immediate"> <property name="com.jaspersoft.studio.unit.height" value="px"/> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Content" positionType="Float" x="25" y="13" width="505" height="10" uuid="bc17c614-dc4e-4089-bc11-0b46d2165e67"> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="com.jaspersoft.studio.unit.leftIndent" value="px"/> </reportElement> <textElement markup="html"> <paragraph leftIndent="0"/> </textElement> <textFieldExpression><![CDATA[$R{RiskToleranceComponent.riskIndicator.subtitlePdf.subtitle}]]></textFieldExpression> </textField> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Header" positionType="Float" x="25" y="0" width="505" height="10" uuid="2edb5a97-17ae-4820-981b-499a32d5f272"> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> </reportElement> <textFieldExpression><![CDATA[$R{RiskToleranceComponent.riskIndicator.title}]]></textFieldExpression> </textField> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Content" positionType="Float" x="25" y="23" width="505" height="10" uuid="a5a398e4-67b7-4861-a1b5-8f124e79b501"> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="com.jaspersoft.studio.unit.spacingBefore" value="px"/> <property name="com.jaspersoft.studio.unit.leftIndent" value="px"/> </reportElement> <box leftPadding="0"/> <textElement markup="styled"> <paragraph leftIndent="10" spacingBefore="0"/> </textElement> <textFieldExpression><![CDATA["\u2022 " + $R{RiskToleranceComponent.riskIndicator.subtitlePdf.point1}]]></textFieldExpression> </textField> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Content" positionType="Float" x="25" y="34" width="505" height="10" uuid="d41a482e-34ca-4703-afd2-c6fc01c47e46"> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="com.jaspersoft.studio.unit.leftIndent" value="px"/> </reportElement> <textElement markup="styled"> <paragraph leftIndent="10"/> </textElement> <textFieldExpression><![CDATA["\u2022 " + $R{RiskToleranceComponent.riskIndicator.subtitlePdf.point2}]]></textFieldExpression> </textField> <frame> <reportElement positionType="Float" x="26" y="49" width="503" height="26" isRemoveLineWhenBlank="true" uuid="b1a93224-24c5-4024-bb8c-ea0b6be0ddaf"> <property name="com.jaspersoft.studio.unit.height" value="px"/> <printWhenExpression><![CDATA[JaspersoftPdfUtil.isVisible($P{riskTolerance}, "riskIndicatorOptions", $P{wphgStatus}, "riskIndicator1")]]></printWhenExpression> </reportElement> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Content" positionType="Float" x="99" y="9" width="404" height="10" isRemoveLineWhenBlank="true" uuid="52bc84c8-9abc-4b4f-a945-640537b178f3"> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <textFieldExpression><![CDATA[$R{RiskToleranceComponent.riskIndicator.riskIndicator1.description}]]></textFieldExpression> </textField> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Content" positionType="Float" x="18" y="9" width="72" height="10" isRemoveLineWhenBlank="true" uuid="dd8ac399-17f1-43a6-b17c-83f48c2e4785"> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> </reportElement> <textFieldExpression><![CDATA[$R{RiskToleranceComponent.riskIndicator.riskIndicator1.label}]]></textFieldExpression> </textField> <image> <reportElement positionType="Float" x="0" y="9" width="10" height="10" isRemoveLineWhenBlank="true" uuid="a670cfd2-ad5b-4236-a8a7-6935d29f2a8e"> <property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <imageExpression><![CDATA[JaspersoftPdfUtil.isHashMapValue($P{riskTolerance}, "riskIndicatorOptions", "riskIndicator1") ? "jasper-report/images/checkbox_checked.png" : "jasper-report/images/checkbox_unchecked.png"]]></imageExpression> </image> </frame> <frame> <reportElement positionType="Float" x="26" y="75" width="503" height="26" isRemoveLineWhenBlank="true" uuid="2226f844-8255-49d2-991a-f675d25c9c04"> <printWhenExpression><![CDATA[JaspersoftPdfUtil.isVisible($P{riskTolerance}, "riskIndicatorOptions", $P{wphgStatus}, "riskIndicator2")]]></printWhenExpression> </reportElement> <image> <reportElement positionType="Float" x="0" y="9" width="10" height="10" isRemoveLineWhenBlank="true" uuid="651e9a91-9381-40bc-b40a-6921d32d10bf"> <property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <imageExpression><![CDATA[JaspersoftPdfUtil.isHashMapValue($P{riskTolerance}, "riskIndicatorOptions", "riskIndicator2") ? "jasper-report/images/checkbox_checked.png" : "jasper-report/images/checkbox_unchecked.png"]]></imageExpression> </image> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Content" positionType="Float" x="99" y="9" width="404" height="10" isRemoveLineWhenBlank="true" uuid="bdc5478f-c799-4703-a9c5-4503e6c95d14"> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <textFieldExpression><![CDATA[$R{RiskToleranceComponent.riskIndicator.riskIndicator2.description}]]></textFieldExpression> </textField> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Content" positionType="Float" x="18" y="9" width="72" height="10" isRemoveLineWhenBlank="true" uuid="41cdd508-ed93-413b-a952-c5a207176365"> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <textFieldExpression><![CDATA[$R{RiskToleranceComponent.riskIndicator.riskIndicator2.label}]]></textFieldExpression> </textField> </frame> <frame> <reportElement positionType="Float" x="26" y="101" width="503" height="26" isRemoveLineWhenBlank="true" uuid="bb2ad175-eb67-49d5-93e7-f097416328ea"> <printWhenExpression><![CDATA[JaspersoftPdfUtil.isVisible($P{riskTolerance}, "riskIndicatorOptions", $P{wphgStatus}, "riskIndicator3")]]></printWhenExpression> </reportElement> <image> <reportElement positionType="Float" x="0" y="9" width="10" height="10" isRemoveLineWhenBlank="true" uuid="0b032f42-e64d-4c28-9e11-0547976c6371"> <property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <imageExpression><![CDATA[JaspersoftPdfUtil.isHashMapValue($P{riskTolerance}, "riskIndicatorOptions", "riskIndicator3") ? "jasper-report/images/checkbox_checked.png" : "jasper-report/images/checkbox_unchecked.png"]]></imageExpression> </image> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Content" positionType="Float" x="99" y="9" width="404" height="10" isRemoveLineWhenBlank="true" uuid="95275114-ce86-4e0e-8978-16d47b6e1b94"> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <textFieldExpression><![CDATA[$R{RiskToleranceComponent.riskIndicator.riskIndicator3.description}]]></textFieldExpression> </textField> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Content" positionType="Float" x="18" y="9" width="72" height="10" isRemoveLineWhenBlank="true" uuid="6aa6bf8b-c4d4-4262-90e0-cf43014dc04f"> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <textFieldExpression><![CDATA[$R{RiskToleranceComponent.riskIndicator.riskIndicator3.label}]]></textFieldExpression> </textField> </frame> <frame> <reportElement positionType="Float" x="26" y="127" width="503" height="26" isRemoveLineWhenBlank="true" uuid="07d42383-8d51-48f8-ac32-a48ef78a77ea"> <property name="com.jaspersoft.studio.unit.height" value="px"/> <printWhenExpression><![CDATA[JaspersoftPdfUtil.isVisible($P{riskTolerance}, "riskIndicatorOptions", $P{wphgStatus}, "riskIndicator4")]]></printWhenExpression> </reportElement> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Content" positionType="Float" x="18" y="9" width="72" height="10" isRemoveLineWhenBlank="true" uuid="8b445294-0217-42dd-b098-fa1f81c373c3"> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <textFieldExpression><![CDATA[$R{RiskToleranceComponent.riskIndicator.riskIndicator4.label}]]></textFieldExpression> </textField> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Content" positionType="Float" x="99" y="9" width="404" height="10" isRemoveLineWhenBlank="true" uuid="8110edc5-17b0-4170-985c-8526376b12b8"> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <textFieldExpression><![CDATA[$R{RiskToleranceComponent.riskIndicator.riskIndicator4.description}]]></textFieldExpression> </textField> <image> <reportElement positionType="Float" x="0" y="9" width="10" height="10" isRemoveLineWhenBlank="true" uuid="95b96855-c994-4198-8b6e-ec78c6a60e65"> <property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <imageExpression><![CDATA[JaspersoftPdfUtil.isHashMapValue($P{riskTolerance}, "riskIndicatorOptions", "riskIndicator4") ? "jasper-report/images/checkbox_checked.png" : "jasper-report/images/checkbox_unchecked.png"]]></imageExpression> </image> </frame> <frame> <reportElement positionType="Float" x="26" y="153" width="503" height="26" isRemoveLineWhenBlank="true" uuid="d85a8b14-ad2a-4c19-a004-07f65e987118"> <property name="com.jaspersoft.studio.unit.height" value="px"/> <printWhenExpression><![CDATA[JaspersoftPdfUtil.isVisible($P{riskTolerance}, "riskIndicatorOptions", $P{wphgStatus}, "riskIndicator5")]]></printWhenExpression> </reportElement> <image> <reportElement positionType="Float" x="0" y="9" width="10" height="10" isRemoveLineWhenBlank="true" uuid="e33f0825-eb88-45cb-b197-a4b395fb2429"> <property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <imageExpression><![CDATA[JaspersoftPdfUtil.isHashMapValue($P{riskTolerance}, "riskIndicatorOptions", "riskIndicator5") ? "jasper-report/images/checkbox_checked.png" : "jasper-report/images/checkbox_unchecked.png"]]></imageExpression> </image> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Content" positionType="Float" x="99" y="9" width="404" height="10" isRemoveLineWhenBlank="true" uuid="83690dc2-28e1-445c-8504-3d34598ff9d6"> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <textFieldExpression><![CDATA[$R{RiskToleranceComponent.riskIndicator.riskIndicator5.description}]]></textFieldExpression> </textField> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Content" positionType="Float" x="18" y="9" width="72" height="10" isRemoveLineWhenBlank="true" uuid="061e1ea7-79b6-4273-84b0-fe1282761620"> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <textFieldExpression><![CDATA[$R{RiskToleranceComponent.riskIndicator.riskIndicator5.label}]]></textFieldExpression> </textField> </frame> <frame> <reportElement positionType="Float" x="26" y="179" width="503" height="26" isRemoveLineWhenBlank="true" uuid="525e5db2-7a29-4a3b-99e8-395bf549f506"> <property name="com.jaspersoft.studio.unit.height" value="px"/> <printWhenExpression><![CDATA[JaspersoftPdfUtil.isVisible($P{riskTolerance}, "riskIndicatorOptions", $P{wphgStatus}, "riskIndicator6")]]></printWhenExpression> </reportElement> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Content" positionType="Float" x="18" y="9" width="72" height="10" isRemoveLineWhenBlank="true" uuid="fd79152f-f0fd-4069-adff-73a4e04ef381"> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <textFieldExpression><![CDATA[$R{RiskToleranceComponent.riskIndicator.riskIndicator6.label}]]></textFieldExpression> </textField> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Content" positionType="Float" x="99" y="9" width="404" height="10" isRemoveLineWhenBlank="true" uuid="da108ce5-2762-4fdd-8f39-98489e02cc08"> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <textFieldExpression><![CDATA[$R{RiskToleranceComponent.riskIndicator.riskIndicator6.description}]]></textFieldExpression> </textField> <image> <reportElement positionType="Float" x="0" y="9" width="10" height="10" isRemoveLineWhenBlank="true" uuid="4ec96861-7391-4088-8a5c-779efa40d6b1"> <property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <imageExpression><![CDATA[JaspersoftPdfUtil.isHashMapValue($P{riskTolerance}, "riskIndicatorOptions", "riskIndicator6")? "jasper-report/images/checkbox_checked.png" : "jasper-report/images/checkbox_unchecked.png"]]></imageExpression> </image> </frame> <frame> <reportElement positionType="Float" x="26" y="205" width="503" height="26" isRemoveLineWhenBlank="true" uuid="eb87dc6b-dd4b-4def-8774-f84cc0ba56f6"> <property name="com.jaspersoft.studio.unit.height" value="px"/> <printWhenExpression><![CDATA[JaspersoftPdfUtil.isVisible($P{riskTolerance}, "riskIndicatorOptions", $P{wphgStatus}, "riskIndicator7")]]></printWhenExpression> </reportElement> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Content" positionType="Float" x="99" y="9" width="404" height="10" isRemoveLineWhenBlank="true" uuid="975e75f0-45ff-41a9-b351-78a8c64b8912"> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <textFieldExpression><![CDATA[$R{RiskToleranceComponent.riskIndicator.riskIndicator7.description}]]></textFieldExpression> </textField> <image> <reportElement positionType="Float" x="0" y="9" width="10" height="10" isRemoveLineWhenBlank="true" uuid="720acab3-540b-4c25-a947-29c48df480f0"> <property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <imageExpression><![CDATA[JaspersoftPdfUtil.isHashMapValue($P{riskTolerance}, "riskIndicatorOptions", "riskIndicator7")? "jasper-report/images/checkbox_checked.png" : "jasper-report/images/checkbox_unchecked.png"]]></imageExpression> </image> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Content" positionType="Float" x="18" y="9" width="72" height="10" isRemoveLineWhenBlank="true" uuid="0ae8c2b7-7b12-4f84-a015-8ebd68b2bdd5"> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <textFieldExpression><![CDATA[$R{RiskToleranceComponent.riskIndicator.riskIndicator7.label}]]></textFieldExpression> </textField> </frame> <frame> <reportElement positionType="Float" x="25" y="314" width="320" height="20" isRemoveLineWhenBlank="true" uuid="a1815e35-5527-4968-baea-030a131ccd13"> <property name="com.jaspersoft.studio.unit.height" value="px"/> <printWhenExpression><![CDATA[JaspersoftPdfUtil.isVisible($P{riskTolerance}, "riskToleranceConsistentOptions", $P{wphgStatus}, "no")]]></printWhenExpression> </reportElement> <image> <reportElement positionType="Float" x="3" y="5" width="10" height="10" uuid="704e41de-f3a7-4f01-ae4d-1b5da90ce3e1"> <property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <imageExpression><![CDATA[JaspersoftPdfUtil.isHashMapValue($P{riskTolerance}, "riskToleranceConsistentOptions", "no") ? "jasper-report/images/checkbox_checked.png" : "jasper-report/images/checkbox_unchecked.png"]]></imageExpression> </image> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Content" positionType="Float" x="23" y="5" width="297" height="10" uuid="cde0b563-10d9-424b-bc1c-5baa5b636c09"> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <textFieldExpression><![CDATA[$R{RiskToleranceComponent.riskToleranceConsistent.no}]]></textFieldExpression> </textField> </frame> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Content" positionType="Float" x="25" y="344" width="322" height="10" isRemoveLineWhenBlank="true" uuid="342522df-b83c-490d-9713-9cbb3200ee36"> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <textFieldExpression><![CDATA[JaspersoftPdfUtil.getHashMapValue($P{riskTolerance}, "riskToleranceConsistentComment")]]></textFieldExpression> </textField> <frame> <reportElement positionType="Float" x="25" y="294" width="320" height="20" isRemoveLineWhenBlank="true" uuid="4f0f2edc-f773-4a46-b0f3-28d0ae9e2182"> <property name="com.jaspersoft.studio.unit.height" value="px"/> <printWhenExpression><![CDATA[JaspersoftPdfUtil.isVisible($P{riskTolerance}, "riskToleranceConsistentOptions", $P{wphgStatus}, "yes")]]></printWhenExpression> </reportElement> <image> <reportElement positionType="Float" x="3" y="5" width="10" height="10" uuid="3b86f845-3b68-48ab-a93e-11b1f5c79fe6"> <property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <imageExpression><![CDATA[JaspersoftPdfUtil.isHashMapValue($P{riskTolerance}, "riskToleranceConsistentOptions", "yes") ? "jasper-report/images/checkbox_checked.png" : "jasper-report/images/checkbox_unchecked.png"]]></imageExpression> </image> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Content" positionType="Float" x="23" y="5" width="297" height="10" uuid="df50872e-7d8d-4af2-ab8f-76fbe60c9f16"> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <textFieldExpression><![CDATA[$R{RiskToleranceComponent.riskToleranceConsistent.yes}]]></textFieldExpression> </textField> </frame> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="ContentLabel" positionType="Float" x="25" y="357" width="130" height="10" uuid="ea5ff53b-16ee-490c-bf16-1c18a40f1165"> <property name="com.jaspersoft.studio.unit.x" value="px"/> </reportElement> <textFieldExpression><![CDATA[$R{RiskToleranceComponent.riskToleranceConsistent.comment}]]></textFieldExpression> </textField> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Header" positionType="Float" x="25" y="279" width="505" height="10" uuid="e94c6c92-cf9f-4d2f-aaed-18969f866914"> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> </reportElement> <textFieldExpression><![CDATA[$R{RiskToleranceComponent.riskToleranceConsistent.title}]]></textFieldExpression> </textField> <line> <reportElement positionType="Float" x="25" y="354" width="504" height="1" uuid="0c7371ed-1249-446c-b18a-a2df4af19413"> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <graphicElement> <pen lineWidth="0.25"/> </graphicElement> </line> <frame> <reportElement positionType="Float" x="25" y="231" width="505" height="38" isRemoveLineWhenBlank="true" uuid="659eae87-a481-4b47-a525-539a508981d7"> <printWhenExpression><![CDATA[JaspersoftPdfUtil.isVisible($P{riskTolerance}, "alternativeInvestmentFunds", $P{wphgStatus})]]></printWhenExpression> </reportElement> <image> <reportElement positionType="Float" x="0" y="27" width="10" height="10" isRemoveLineWhenBlank="true" uuid="7cb70852-d14e-4b9c-93f3-b775868f2746"> <property name="com.jaspersoft.studio.unit.width" value="px"/> <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"/> </reportElement> <imageExpression><![CDATA[JaspersoftPdfUtil.isHashMapValue($P{riskTolerance}, "alternativeInvestmentFunds", true) ? "jasper-report/images/checkbox_checked.png" : "jasper-report/images/checkbox_unchecked.png"]]></imageExpression> </image> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Header" positionType="Float" x="0" y="8" width="505" height="10" isRemoveLineWhenBlank="true" uuid="236cfdba-67d5-4701-bad2-6e7ec2dd683b"> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="com.jaspersoft.studio.unit.y" value="px"/> <property name="com.jaspersoft.studio.unit.x" value="px"/> </reportElement> <textFieldExpression><![CDATA[$R{RiskToleranceComponent.alternativeInvestment.title}]]></textFieldExpression> </textField> <textField textAdjust="StretchHeight" isBlankWhenNull="true"> <reportElement style="Content" positionType="Float" x="20" y="27" width="485" height="10" isRemoveLineWhenBlank="true" uuid="c53854a1-28ab-4b49-9069-59e4051bd1de"> <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"/> </reportElement> <textFieldExpression><![CDATA[$R{RiskToleranceComponent.alternativeInvestment.label}]]></textFieldExpression> </textField> </frame> </band> </title> </jasperReport>Empty space appears in jasper report when hiding frames
Note: This part is after "What is your maxium risk tolerance...". Stackoverflow does not allow me to post more code.
1. I have tried applying isRemoveLineWhenBlank in the fields inside frame.
2. Moving fields around but that did not change anything, the space appears to be at this particular location constantly
3. Tried adding more frames to conver the current frames, tried removing frames
1 Answer:
This is now resolved.
The solution which worked for me was to create multiple detail bands and put the content to be hidden in separate detail bands. Then use the printWhenExpression on those detail bands. This helped me hide the fields as well as remove the space from the bottom of the report too.
Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times.
This is now resolved.
The solution which worked for me was to create multiple detail bands and put the content to be hidden in separate detail bands. Then use the printWhenExpression on those detail bands. This helped me hide the fields as well as remove the space from the bottom of the report too.