Bug With Stretch on Overflow Fields?

2
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
2006 IR Open Dicussion's picture
Joined: Aug 10 2006 - 3:24am
Last seen: 12 years 8 months ago
necro'd post... seems we have the same problem
cutebluangel - 6 years 6 months ago

0 Answers:

No answers yet
Feedback