我想根据字段值打印带有表达式的细节带,但似乎无效。我试过了:
new.java.lang.Boolean($F{Code}.equals("COD"))
new Boolean($F{Code}.equals("COD"))
$F{Code}.equals("COD")
$F{Code} == "COD"
有什么想法让它有效吗?
<band height="60">
<printWhenExpression><![CDATA[$F{Code}.equals("COD")]]></printWhenExpression>
<staticText>
<reportElement x="370" y="20" width="100" height="30" uuid="dd9cb634-244f-4dd4-b329-4c90e406afba"/>
<text><![CDATA[One Detail]]></text>
</staticText>
</band>
<band height="56">
<staticText>
<reportElement x="370" y="20" width="100" height="30" uuid="d4259182-215b-4b3e-9673-bcd6cb5ac355"/>
<text><![CDATA[Another detail]]></text>
</staticText>
</band>