我試圖用它來打印值條件下表中的值使用條件打印iREPORT分享到人人
我有三列ABC
A is string
B is integer
C is integer
我的條件是,如果列A ==「用戶」
然後在B列的打印值或使其無效
($F{A}.equals("USER")?null:$F{B})
這給類型轉換錯誤
<jr:column width="15" uuid="733459e9-1ed8-4ce2-a74d-87dc078b1382">
<jr:tableFooter height="29" rowSpan="1"/>
<jr:columnFooter style="table 8_CH" height="30" rowSpan="1"/>
<jr:detailCell style="table 8_TD" height="20" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="15" height="20" uuid="bd3860a4-999a-4121-a701-3481a4fdf98e"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{TOP}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="15" uuid="2e7fa82c-7f28-4af6-a63d-ae468afeea32">
<jr:tableFooter height="29" rowSpan="1"/>
<jr:columnFooter style="table 8_CH" height="30" rowSpan="1"/>
<jr:detailCell style="table 8_TD" height="20" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="15" height="20" uuid="33707346-9121-4010-8c12-981eb9f4de77">
<printWhenExpression><![CDATA[$F{TOP}.endsWith("NN")?null:$F{COP}]]></printWhenExpression>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{COP}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
?你應該發佈* jrxml *文件 – 2014-09-22 11:32:55
你能幫我查詢代碼是三頁長嗎 – 2014-09-22 11:35:35
尤其是顯示你周圍的行($ F {A} .equals(「USER」)?null:$ F {B} )'。 – mkl 2014-09-22 13:17:05