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)
Wrap Label text of table/Crosstab cell
Mani Kandan
<p> I am using BIRT4.4.1 for my report generation in eclipse. I have designed the report with more tables and crosstab used. I am facing problem when i export it to excel report.</p>
<p> </p>
<p style="font-size:15px;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;">I would like to wrap my text of Table Header, it works fine in webviewer but when i exported to excel the table cell text is in a single line, and also the text is overflowed. I dont want to make the cell width equal to the content, I would like to wrap the text based on its container width.</p>
<p style="font-size:15px;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;">I have set the cell width and label whitespace property as auto. is it correct, or what do i do to make it work in exported excel report?</p>
<p style="font-size:15px;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;"> </p>
<p style="font-size:15px;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;">In web,</p>
<p style="font-size:15px;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;">
Find more posts tagged with
Comments
newscott
<p>Hi,</p>
<p> </p>
<p> If i understand your problem correctly, i guess you were not using Ctrl + Enter for the header text. </p>
<p> </p>
<p>Thanks,</p>
<p>newscott.</p>
Mani Kandan
<p>Mr.newscott please tell me exactly what i have to do to set wrap text property for whole report.</p>
newscott
<p>You were using data element as header mean please use below script in on render of that particular data element.</p>
<p> </p>
<p>if (reportContext.getOutputFormat() == "xlsx" || reportContext.getOutputFormat() == "xls_spudsoft" ){</p>
<div>this.getStyle().whiteSpace = "pre";</div>
<div>}else{</div>
<div>}</div>
Mani Kandan
<p>No my header has label only.</p>
newscott
<p>If it is label then no issue...Just wrap text manually using Ctrl+Enter</p>
Mani Kandan
<p>
@newscott
Your method is worked in excel(that is whatever i seen on report design, excel looks the same(have not set wrap text for that cell)) but my requirement is i want the "wrap text" option should be enabled for the headers in excel report.</p>
Mani Kandan
<p>newscott I have solved by setting whitespace to 'preformatted' for the labels. Its working in excel but not in webviewer. so i would like it to be same in both webviewer and excel. so is there any way to set this property only when i exported to excel?</p>
newscott
<p>Can you please attach a sample report...</p>
Mani Kandan
<p>I solved it by setting "preformatted" whitespace to the element and also setting its width.</p>