空白行を表示するレポート用に1行にヌルテキストフィールド(文字列またはbigdecimal値が入ります)を入れました。私はそのライン内のレポート要素のプロパティisRemoveLineWhenBlank
を使用し、ヌル行があり、空白行を削除するためにiReport:データ行なしのテキストフィールドを含む行を非表示にする方法は、さまざまな種類のデータが含まれています。
。しかし、それは動作しません。
誰か助けてくれますか?
スナップ:
出力スナップ:
jrxml:
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Created with iReport - A designer for JasperReports -->
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
<jasperReport
name="WEB_PREVIEW"
columnCount="1"
printOrder="Horizontal"
orientation="Portrait"
pageWidth="595"
pageHeight="900"
columnWidth="535"
columnSpacing="0"
leftMargin="30"
rightMargin="30"
topMargin="20"
bottomMargin="20"
whenNoDataType="NoPages"
isTitleNewPage="false"
isSummaryNewPage="false">
<property name="ireport.scriptlethandling" value="0" />
<property name="ireport.encoding" value="UTF-8" />
<import value="java.util.*" />
<import value="net.sf.jasperreports.engine.*" />
<import value="net.sf.jasperreports.engine.data.*" />
<parameter name="GROSS_RENTAL_INCOME_SQPA_LABEL" isForPrompting="false" class="java.lang.String"/>
<parameter name="GROSS_RENTAL_INCOME_SQPA" isForPrompting="false" class="java.math.BigDecimal"/>
<defaultValueExpression ><![CDATA["C:\\Development_New\\Cyprus\\Cyprus\\WebRoot\\report\\"]]></defaultValueExpression>
</parameter>
<background>
<band height="0" isSplitAllowed="true" >
</band>
</background>
<title>
<band height="0" isSplitAllowed="true" >
</band>
</title>
<pageHeader>
<band height="32" isSplitAllowed="true" >
<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="367"
y="105"
width="96"
height="12"
key="textField"
positionType="Float"
isRemoveLineWhenBlank="true">
<printWhenExpression><![CDATA[new Boolean($P{GROSS_RENTAL_INCOME_SQPA}!=null)]]></printWhenExpression>
</reportElement>
<box></box>
<textElement>
<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{GROSS_RENTAL_INCOME_SQPA_LABEL}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="###,##0.00" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="472"
y="105"
width="48"
height="12"
key="textField"
positionType="Float"
isRemoveLineWhenBlank="true">
<printWhenExpression><![CDATA[new Boolean($P{GROSS_RENTAL_INCOME_SQPA}!=null)]]></printWhenExpression>
</reportElement>
<box></box>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$P{GROSS_RENTAL_INCOME_SQPA}]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band height="0" isSplitAllowed="true" >
</band>
</columnFooter>
<pageFooter>
<band height="0" isSplitAllowed="true" >
</band>
</pageFooter>
<summary>
<band height="0" isSplitAllowed="true" >
</band>
</summary>
</jasperReport>
あなたが欲しいものを示すスクリーンショットを投稿できますか? –
pls上記のようにスクリーンショットを確認 – Sweety
iReport(エクスポートの結果ではない)とjrxmlファイルのスニペットにレポートデザインのスクリーンショットを投稿できますか? –