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

"printWhenExpression" does not work.


ATrica

Recommended Posts

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

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

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

  • 2 weeks later...

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...