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 space in PDF document
GoranG
<p>Hello all,</p><p> </p><p>we are using </p><pre class="_prettyXprint">Eclipse BIRT Designer Version 2.5.2.v20100208 Build <2.5.2.v20100210-0630</pre><p>(yes, copy-pasted).</p><p> </p><p>What I want to achieve is the following: we have a dynamic text field with some text inside, that goes on for several lines (usually 2, but sometimes 3 lines). At the end of first line there is an amount printed out. Something like </p><p><em>the amount is CHF 9'882.00.</em></p><p><em>and the text continues.</em></p><p> </p><p>actually, it may happen that this is printed like</p><p> </p><p><em>the amount is CHF</em></p><p><em>9'882.00. and the text continues</em>.</p><p> </p><p>Now, what I want to achieve is, that the currency and the amount are always together. Either both in first line, or both in second line, depending on the amount (if the amount is 100.00 or so, everything is in the first line).</p><p> </p><p>We are using the dynamic text because in order to correctly format the amount, we call the javascript function.</p><p> </p><p>So the content of the dynamic text looks like:</p><pre class="_prettyXprint _lang-js">...the amount is formatNumber(row["AmountToPrintOut"]) and the text continues.</pre><p>now, I've tried to manipulate the "formatNumber" function to do:</p><pre class="_prettyXprint _lang-js">var formattedNumber = someLocalCodeThatWorks(number);return 'CHFxA0' + formattedNumber;</pre><p>or</p><pre class="_prettyXprint _lang-">var formattedNumber = someLocalCodeThatWorks(number);return 'CHF ' + formattedNumber;</pre><p>but this lead to no result in PDF. We do not create any other format but PDF. Is there a way to have a nbsp in PDF?</p><p> </p><p>thanks for your help,</p><p>G</p>
Find more posts tagged with
Comments
kclark
<p>Why don't you use a text item set to html? Then do your formatting in the onCreate() and then you could use <br> to create the line breaks.</p>
GoranG
<p>Thank you for the answer. I didn't see it before, since the look'n'feel of this forum changed and I was baffled. </p><p> </p><p>When I try your solution out, I will let you know. For the time being, I am starting newline at a fixed position. The customer didn't report an error. Yet. Will see.</p><p> </p><p>thanks,</p><p>G</p>