Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Non-breaking line spaces are breaking
HarryIX
Hi,<br />
I?m relatively new to BIRT and our local guru has left so I?m hoping someone may have come across this error and developed a work around.<br />
<br />
In the report, I have a text block which contains some set text and two variable fields. Eg <br />
<br />
We have received your application for <VALUE-OF> row[?applicationName?] </VALUE-OF> from <VALUE-OF> row[?businessName?] </VALUE-OF>.<br />
<br />
Currently, depending on the length of ?applicationName? the Business name will wrap over the line such as: Fred?s <br />
Tyres<br />
<br />
I?ve been told that I?m not allowed to break up the business name (unless it is extremely long) and that is should always be on the same line.<br />
<br />
I?ve tried replacing spaces with but with no luck ? the line still breaks mid business name.<br />
<br />
I would simply but a <BR/> before the business name, but this does not work (example below)<br />
<br />
<em class='bbc'>We have received your application for <strong class='bbc'>a very large application program name with many <br />
words </strong>for<br />
Fred?s Tyres</em><br />
<br />
I am stuck using BIRT 2.5.2.v20090925-3417w31211318 with Build id: v20100210-0630 and due to corporate red tape- I am unable to update the emitter either.<br />
<br />
If there is a solution that I can enter as a script or similar I would be very thankful.
Find more posts tagged with
Comments
mwilliams
You know what the length of the static text will be, so depending on the number of characters you can fit in a row - the number of characters you currently have, based on the static text length plus the length of you application name, you'd either include a <BR/> tag before the business name or not. You should be able to determine this in the value-of tag.
HarryIX
Thanks for your reply MWilliams.
I experimented with an if statement before, something along the lines of if the length of the application name is greater than X then put the line break here.
The only problem was that like most things in my environment, I?m stuck on a non-mono font choice and I can?t predict the length of a string accurately based on the numbers of characters (eg 4 I?s iiii takes up less than 4 W?s wwww).
My breaking issues is quite a major one for most of my reports. I often have 3 user entered variables inside a text block, and it flows on to date fields <VALUE-OF format=?d MMMM yyyy?> row[?date?] </VALUE-OF> with BIRT insists on breaking over the spaces.
Would there be any other way to enforce a
I tried mucking around with whitespace etc and all I got was the rest of the line chopped off?
mwilliams
Sorry for the delayed response. The whitespace property allows it to wrap or not wrap, so that's why you saw it cut off. Yes, the prediction of text will not be 100% accurate, but it's better than nothing. You'd have to look for a good average number of characters that fit on a line and just go with it. If you can set up an example report that will show some variances with this, I'll try to work with it to come up with a best solution.