Jump to content

Concept of bands and stretching


denys

Recommended Posts

 Hi

I was trying to make data row on my report to stretch vertically and realised that maybe I don't grasp how to properly use bands.

I have a band with a set of textFields - it is supposed to simply display a table of report data. so I write

<detail>

<band height="630" splitType="Immediate">

 

    <textField isStretchWithOverflow="true">

<reportElement style="CellStyle" x="0" y="0" width="140" height="30"/>

<textElement textAlignment="Left"/>

<textFieldExpression class="java.lang.String"><![CDATA[$F{var1}]]></textFieldExpression>

</textField>

    <textField isStretchWithOverflow="true">

<reportElement style="CellStyle" x="140" y="0" width="75" height="30"/>

<textElement/>

<textFieldExpression class="java.lang.Double"><![CDATA[$F{var2}]]></textFieldExpression>

</textField>

 

</band>

</detail>

 

as you may see I am trying to use attributes 'isStretchWithOverflow' and stretchType.

however this does not help.

what actually helped is increasing the hight of the band so it can fit in stretched fields. OK, but what hight should I put for a band then?

at this point I decided that I am going to set hight the band to fill one page but band would have to hold many rows. but now I have a problem of populating the data of many rows into the band:

1. new row data is not pulled until band is finished - so even if I manually fill out the band with fields for extra rows they are still showing the same data

2. is there a way to tell a band to populate as many rows as possible?

 

Ultimate question:

how do I properly write a table report which:

a) is displayed on many pages and b) able to stretch hight of row of fields if value of one field doesn't fit

 

regards,

Denys

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...