ATrica Posted March 29, 2021 Share Posted March 29, 2021 In the following code, the "printWhenExpression" does not work.The parameter W_Transe value = "YES".No detail row printed.PLEASE help me.Many thanks for any usable idea.Alex </parameter> <parameter name="W_Transe" class="java.lang.String" evaluationTime="Early"> <parameterDescription><![CDATA[Print TRANCHES (YES / NO)]]></parameterDescription> <defaultValueExpression><![CDATA["YES"]]></defaultValueExpression> </parameter> . . . <detail> <band height="58" splitType="Stretch"> <printWhenExpression><![CDATA[$P{W_Transe}==("YES")]]></printWhenExpression> <textField> <reportElement x="0" y="10" width="49" height="20" uuid="a9548785-db25-4d8f-9be4-6041f7675457"/> <textElement verticalAlignment="Bottom"/> <textFieldExpression><![CDATA[$F{Prj_COD}]]></textFieldExpression> </textField> . . . <line> <reportElement x="0" y="35" width="810" height="5" uuid="484c3431-5abb-4574-88a9-cd992696162b"/> </line> <textField> <reportElement x="708" y="8" width="22" height="23" uuid="c70389b2-f9c7-4ba6-988c-bfe75138bb1a"/> <textElement> <font size="8"/> </textElement> <textFieldExpression><![CDATA[$P{W_Transe}]]></textFieldExpression> </textField> </band> </detail> Link to comment Share on other sites More sharing options...
yassinswag50 Posted March 29, 2021 Share Posted March 29, 2021 what are you trying to do exactly ? Link to comment Share on other sites More sharing options...
eileenm Posted March 29, 2021 Share Posted March 29, 2021 I believe I am having the same issue. In my case, I want a group band to print based on the value of a user parameter. I entered " $P{SUMM_TYPE} == "Detail"" for the 'Print When Expression', but the band does not print at all, even when the condition is met. It only prints if I remove the value from the 'Print When Expression.' Link to comment Share on other sites More sharing options...
ATrica Posted March 30, 2021 Author Share Posted March 30, 2021 Hi !Exactly as in your report. The component having "printWhenExpression" is not printer, even the condition is TRUE or FALSE. In my case it is a DETAIL row. Link to comment Share on other sites More sharing options...
ATrica Posted April 7, 2021 Author Share Posted April 7, 2021 No idea about this non functioning clause ? Link to comment Share on other sites More sharing options...
ATrica Posted April 7, 2021 Author Share Posted April 7, 2021 I solved it ! ! !<printWhenExpression><![CDATA[$P{W_Transe}.equals("YES")]]></printWhenExpression>The idea source was https://community.jaspersoft.com/questions/1025921/comparing-integers-within-printwhenexpression-tagMany 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