Resizing bug
Posted: Wed May 20, 2009 10:26 am
Hi,
There's a bug for text components which are set to allow grow, docked as fill and wrapped.
The issue is not simple, and took me days to discover the problem, I'll try to describe in details to clarify:
When a text component's dock style is set to fill, it takes the width dictated to it by the left/right components, and the page size and margins.
Text wrapping can use this inferred size to determine how to wrap text, and determine the number of lines.
If the component is set to allow grow, the wrapping causes the component to grow in order to accomodate the number of lines inside.
This works perfectly well on the first time the report being built using the default page size and page margins from the design time.
If you try to change the page size, or page margins of the page after the report is loaded (even before compile / render methods are called), everything in the page fits correctly into the new size, but the height of described text components do not change accordingly.
Example: when you see a report, there are several rows of the band that have a long text, which are broken into two or three lines.
If you change the page size / margins (in the preview window) to a smaller size, some of them should break into more lines, but the height of the component do not change, so there will be rows with two lines of text but only space for one, or three lines of text but space for two...
The opposite is also true, if you change the size to a larger size, there will be single lines of text in a text component with enough height for two lines.
I tried to explain the issue elaborately in order to help you guys find and fix it, but if it is not clear, let me know to provide more information.
Thanks in advance,
-Hamed