Reputation: 187
I've got xml data like this:
<root>
<eee>aaa</eee>
<eee>bbb</eee>
<eee>ccc</eee>
<eee>ddd</eee>
</root>
I want to displays elements eee
in my detail
band. Therefore I added textField
that contains expression $F{My_elem}
and I get:
aaa
bbb
ccc
ddd
It looks pretty good but the problem is when I add "Print when" expression into my textField which is:
$V{REPORT_COUNT}%2==1
My report displays:
aaa
ddd
But my aim is to display:
aaa
ddd
"Remove line when blank" set to TextField does't work.
How can I not display the blank line when details bound iterate by elements?
Upvotes: 1
Views: 661
Reputation: 21710
Move the "Print when" expression to the detail
band
<detail>
<band height="20">
<printWhenExpression><![CDATA[$V{REPORT_COUNT}%2==1]]></printWhenExpression>
.... your text fields...
</band>
</detail>
This way instead of saying that your textField
should not be displayed, you tell the report to remove the whole detail
band
Upvotes: 3