Jump to content
Changes to the Jaspersoft community edition download ×

Bug With Stretch on Overflow Fields?


Recommended Posts

By: Tcepsa - tcepsarorrim

Bug With Stretch on Overflow Fields?

2006-07-17 08:05

I have a report created with iReport 1.2.5 that contains a single data field (the dimensions of the field do not seem to have an impact on the results I am seeing). It is fixed relative to the bottom of the band, and can also stretch on overflow. The data is coming from a JDBC connection to an Oracle database.

 

The problem occurs when I generate the report. For database entries where the field contains a small enough amount of text to fit on one line, the text is displayed properly. For database entries where that last field would need to stretch to a point beyond the current fixed height of the band, however, no text is displayed. The horizontal alignment does not seem to matter.

 

As an example, say I have the field start at 0,0 with a width of 500 and a height of 16. The height of the band is 18, so if there is enough data to cause the text to wrap even once, it will put the bottom of the field past the bottom of the report. In those cases, no text is displayed.

 

This also seems to happen when the field position is set to Float.

 

I suspect that what is happening is that, compared to the bottom of the report, the text starts at (height of band-18, 0). When it sees that it needs to wrap the text, it recalculates the height that the band needs to be to accomodate the wrapped text and resizes it, and it calculates how big the field's textbox needs to be to hold the wrapped text, but it does not recalculate the textbox's starting point relative to the bottom of the band; it still thinks that it is at (new height of band-18, 0). Then it sees that it overlaps the bottom of the band (because the new height of the textbox is more than eighteen) and so it does not print the text. If this is the case, then the calculation to determine the new starting coordinates for the textbox should, I believe, be at (new height of band-(18+new height of textbox), 0) relative to the bottom of the band.

 

Please let me know whether anyone else has experienced this problem and it is actually a bug, or if I am simply doing something incorrectly.

 

Thanks!

Tcepsa

Link to comment
Share on other sites

  • 6 years later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

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...