|Re: Table cell Word Wrap [message #630328 is a reply to message #630269]
||Fri, 01 October 2010 15:24
| Jason Weathersby
Registered: July 2009
You may want to look at this thread.
http://www.birt-exchange.org/org/forum/index.php/topic/19827 -how-do-i-use-word-wrap-in-report-design/page__s__ad0bb32bbb ac95aee7b5556149417a73
If the element is a data element you could enter an expression like:
length = longStr.length;
if(length <= width)
return (longStr.substring(0, width) + "\n" +
wrap(longStr.substring(width, length), width));
Just replace the wrap(str,size) with your data column
wrap( dataSetRow["mylongstring"], 6 );
If there is whitespace it should be autowrapping.
On 10/1/2010 7:29 AM, Sapphie wrote:
> Hi All
> I am new to BIRT and just trying to get to to grips with it. I am using
> the 2.6.1 all in one package.
> I have created a report and added a table. The columns attached to the
> table are pulled from a MySQL database.
> The problem I have is that if string data is added to table cells, I
> cannot get the text to wrap onto a new line. If I set the report layout
> as 'Auto Layout', the table expands to the right to accommodate the long
> line but this doesn't render properly in PDF.
> If I use 'Fixed Layout' the string returned just gets truncated at the
> right hand edge of the cell. I want it to wrap onto a new line if
> I thought BIRT was based on a web paradigm?
> I must be doing something really stupid and missed something obvious.
> Can anyone point me in the right direction? i can't seem to see a 'word
> wrap' property anywhere.
Powered by FUDForum
. Page generated in 0.04155 seconds