Home
Analytics
Long text Truncation
harrykrs
Hi I m using Birt 2.3.2 when a long dynamic text is coming in the report it is getting truncated whenexported to pdf format The requirement is to make the text come in next line instead of getting truncated
Find more posts tagged with
Comments
mwilliams
Do you have the whitespace property set to allow wrapping? If it is, do you maybe have a line height set on the row that this dynamic text is in?
harrykrs
The white space property is inherited as normal.
There is no option like wrapping there are options like auto, normal and preformated.
but the white space option is not changing to auto.nothing is set on the row the dynamic text is in
Im using birt2.3.2
CBR
Set it to auto. Also have a look if the dynamic text is within a parent element, like a table cell or a grid. If yes have a look if you set a height for this element.
h j
Hi All,
I am also facing the same problem where my data is getting truncated(if it is too long & doesnt contain space in between) after extracting the report in pdf format.
Report is set in Auto Layout mode.
For e.g. i have a table(width 100%) containing 4 columns(first columns width is 40% & rest 3 columns 20% each).
So if i enter the same dataset in all 4 dynamic texts of each column,only the column having 40% width displays the data correctly,data gets truncated in rest of the columns having width 20%.
Should i increase the width of table more then 100% or what ??
Thanks,
h j
CBR
Hi hj,
this is BIRTs default behaviour. The fact that your string does not contain a single space is causing BIRT to truncate the text. There is nothing you can do about it. The question is: What do you want BIRT to do? Making the table wider then 100% will cause the table beeing truncated at 100%.
Vimittz
<p><span style="font-family:arial, helvetica, sans-serif;"><span style="background-color:rgb(252,252,252);">Hi All,</span></span></p>
<p> </p>
<p> </p>
<p><span style="font-family:arial, helvetica, sans-serif;"><span style="background-color:rgb(252,252,252);">Did anyone find the solution for this !!</span></span></p>
<p> </p>
<p> </p>
<p><span style="font-family:arial, helvetica, sans-serif;"><span style="background-color:rgb(252,252,252);">i am facing kind of same issue !!</span></span></p>
<p> </p>
<div><span style="font-family:arial, helvetica, sans-serif;">I am facing an issue if I type a long text without space then the text is getting truncated if i export BIRT Report in .pdf format whereas if there is spaces in the text it shows in proper manner.</span></div>
<div> </div>
<div><span style="font-family:arial, helvetica, sans-serif;">Text getting truncated : 'jkdsfhksjdhfkjsdhfkjsdhfkjshdkfjhsdkjfhksdjfhksjdfhksjdfhksjdhfkjsdhfkjsdfksjdhfkjhsdfkjhsdkfjhsdkjhfkdjfhksdjhfkjsdhfkjsdhkfjsdhfkjsdhfkjsdhfkjsdhfkjdshkfjsdhkfjhdskfjhsdkfjhsdkjfhsdkjfhksdjfhksdjhfksdjhfksjdhfkjsdhfkjsdhkfjsdhkfjsdhkfjsdhkfjhsdfkjhslkhsdlkhsdlfkhsdlkfhlsdkfhslkhalkshlskhflkahslhflaksfhaslfkahsflkashflaskfhlaksfhalkfhalskhfaslkfhalkfhakh kjgsfkj klugflj lafkjgsal lksdjl lkhjd ajkl galsdkgj ljha slfdjglajfglkjfgak;fga lfgalf lkfgalksfglkjfgasgfljgfklagsfkljfgljgflakjgfjkaggggggg'</span></div>
<div> </div>
<div><span style="font-family:arial, helvetica, sans-serif;">Text not getting truncated : 'RedHat Company is good Option!!!! RedHat Company is good Option!!!! RedHat Company is good Option!!!! RedHat Company is good Option!!!! RedHat Company is good Option!!!! RedHat Company is good Option!!!! RedHat Company is good Option!!!! RedHat Company is good Option!!!! RedHat Company is good Option!!!! RedHat Company is good Option!!!! RedHat Company is good Option!!!! RedHat Company is good Option!!!! RedHat Company is good Option!!!! RedHat Company is good Option!!!! RedHat Company is good'</span></div>
<div> </div>
<div><span style="font-family:arial, helvetica, sans-serif;">How come second one is properly shown and first one is getting truncated??</span></div>
<div> </div>
<div><span style="font-family:arial, helvetica, sans-serif;">Can any one help me out of this !!</span></div>
<div> </div>
<div> </div>
<div><span style="font-family:arial, helvetica, sans-serif;">We have used Auto Wrapping for whitespace !!!</span></div>
vijj
<p>Here is a partial solution - it can be printed only as HTML. You can use HTML Text item or Dynamic Text item with Content Type = HTML. </p>
<p>At least, it works when you print as HTML, but use "Save as PDF" instead of actual printing. </p>
<pre class="_prettyXprint">
<div id="myDiv" style="width: 100%; word-wrap:break-word;">jkdsfhksjdhfkjsdhfkjsdhfkjshdkfjhsdkjfhksdjfhksjdfhksjdfhksjdhfkjsdhfkjsdfksjdhfkjhsdfkjhsdkfjhsdkjhfkdjfhksdjhfkjsdhfkjsdhkfjsdhfkjsdhfkjsdhfkjsdhfkjdshkfjsdhkfjhdskfjhsdkfjhsdkjfhsdkjfhksdjfhksdjhfksdjhfksjdhfkjsdhfkjsdhkfjsdhkfjsdhkfjsdhkfjhsdfkjhslkhsdlkhsdlfkhsdlkfhlsdkfhslkhalkshlskhflkahslhflaksfhaslfkahsflkashflaskfhlaksfhalkfhalskhfaslkfhalkfhakh kjgsfkj klugflj lafkjgsal lksdjl lkhjd ajkl galsdkgj ljha slfdjglajfglkjfgak;fga lfgalf lkfgalksfglkjfgasgfljgfklagsfkljfgljgflakjgfjkaggggggg</div>
</pre>
mwilliams
<p>One thing I've done is to dynamically insert break characters using script into long continuous character strings that contain no break characters. You could also log a bug for this in the bugzilla at eclipse.org/birt/community/. If you do that one, please post the bug info in here for future reference.</p>
Vimittz
<p>Hi, </p>
<p> </p>
<p>Actually,<br><br>
The text contains spaces and it is proper statements in Russian but it is truncating and one more thing it is getting truncated if I create a new record in Russian envrionments and add some tasks in Russian and then if i run the report its getting truncated whereas if i add any task in english environment in the same interface(Russian Interface) its properly shown.</p>
<p> </p>
<p>And yes its truncating in .pdf file only!</p>
<p> </p>
<p>
</p>
mwilliams
<p>Interesting. So, if I'm understanding correctly, it seems to be an issue with recognizing the break characters within your Russian text. This seems like a bug, to me. Please file a bug for this in the bugzilla at eclipse.org/birt/community. Let me know if I'm understanding incorrectly.</p>
Vimittz
<p>Hi <span style="color:rgb(90,90,90);font-family:'Source Sans Pro', sans-serif;background-color:rgb(252,252,252);">Michael ,</span></p>
<p> </p>
<p><span style="color:rgb(90,90,90);font-family:'Source Sans Pro', sans-serif;background-color:rgb(252,252,252);">Thanks for Reply !!
</span></p>
<p> </p>
<p><span style="color:rgb(90,90,90);font-family:'Source Sans Pro', sans-serif;background-color:rgb(252,252,252);">Yes u are getting it correctly!!</span></p>
<p> </p>
<p><span style="color:rgb(90,90,90);font-family:'Source Sans Pro', sans-serif;background-color:rgb(252,252,252);">This is actually reported as a bug but i am not able to replicate it as it is not happening our English Environments.</span></p>
<p> </p>
<p><span style="color:rgb(90,90,90);font-family:'Source Sans Pro', sans-serif;background-color:rgb(252,252,252);">And there is something which i am not understanding in the solution! :P</span></p>
<p> </p>
<p><span style="color:rgb(90,90,90);font-family:'Source Sans Pro', sans-serif;background-color:rgb(252,252,252);">Please find below for details of the ticket raised in Bugzilla :</span><br><br><br><a data-ipb='nomediaparse' href='
https://bugs.eclipse.org/bugs/show_bug.cgi?id=308786'><b>Bug 308786</b></a></p>
;
<p> </p>
<p><b><a data-ipb='nomediaparse' href='
https://bugs.eclipse.org/bugs/show_bug.cgi?id=250851'>Bug 250851</a> </b></p>
;
<p> </p>
<p><span style="background-color:rgb(252,252,252);">Above two bugs seem to be alike my problem.</span></p>
<p> </p>
<p><span style="background-color:rgb(252,252,252);">Nevertheless i will file a new bug
</span><br><br><span style="background-color:rgb(252,252,252);">Regards,</span></p>
<p><span style="background-color:rgb(252,252,252);">Vipul</span><br>
</p>
Akhil AK
<p>Birt allows one to do code in JavaScript you can write a function to make text to truncate. It is also allow you to apply for dynamic text also. Given an example below.</p>
<p> </p>
<p>function wrap(longStr,width){<br>
length = longStr.length;<br>
if(length <= width)<br>
return longStr;<br>
return (longStr.substring(0, width) + "\n" + wrap(longStr.substring(width, length), width));<br>
}<br>
wrap( row["parameter_value"], 80);</p>
<p> </p>
<p>Width is 80 for me. You can choose the length based on your requirement.</p>