0

Am using JasperReports with Struts2 to generate a pdf of comparision report. Am doing printOrder="Horizontal" to show comparision column wise.

In detail -

<detail>
    <band height="1200">
                <textField isStretchWithOverflow="true">
                <reportElement style="Serif_Normal" x="0" y="900" width="369" height="20" positionType="Float"/>
                <textFieldExpression class="java.lang.String">
                <![CDATA[$F{PROVFORDRAININGSEDIMENTS}]]>
                </textFieldExpression>
             </textField>
        </band>
</detail>

But isStretchWithOverflow not working here? texts are still overlapping. is it because printOeder is set to Horizontal?

AmitN
  • 73
  • 3
  • 12
  • Meybe this question [here](http://stackoverflow.com/questions/10412495/stretch-a-row-with-data-overflow-while-having-multiple-rows-in-a-single-band) will help you. I faced the same problem almost a year ago. – Rachcha Mar 16 '13 at 11:46
  • @Rachacha .. Tried with those 4 options but no luck. – AmitN Mar 16 '13 at 12:10

1 Answers1

3

When printOrder is set to Horizontal, text fields will not stretch. This is because JasperReports strives to align each record across the columns in a report, and allowing them to stretch could cause subsequent data to be misaligned.

GenericJon
  • 8,746
  • 4
  • 39
  • 50