Home
Analytics
How to wrap Column data in PDF or Html Rendering
harsimran
Using BIRT 2.6.2 for Report Generations .i have two specific questions:
1)When Generating PDF or HTML output file through BIRT Runtime records are not coming complete. I means value cut off if specific data value length is big.How to wrap text in this case so value came in next row and not cut half way.
2)In HTML reports when i generating with chart image a seprate .png file created at given image directory. So Html report file always need this image directory 's png file.But if i am pulling these html based report from linux and try to open on window its not showing image as png file not availabe.
how i can overcome this problem(like in PDF reports no seprate image file created and easy to pull anywhere and display report)
Find more posts tagged with
Comments
JasonW
On issue 1:
is there space in the data? If not 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__ad0bb32bbbac95aee7b5556149417a73
and this one:
http://www.birt-exchange.org/org/forum/index.php/topic/22040-word-wrap/page__s__cbd21309710d2ef5a19ebf2d532d7b10
On issue 2:
That is the way the default image handler works. Look at:
http://www.eclipse.org/birt/phoenix/deploy/reportEngineAPI.php#emitterconfiguration
You could write your own image handler and do something different. For example, have a look at this:
http://www.birt-exchange.org/org/devshare/deploying-birt-reports/1440-base64-imagehandler/
Jason
harsimran
Hi
For Issue 1)
As you suggested I Followed:
http://www.birt-exchange.org/org/forum/index.php/topic/22040-word-wrap/page__s__cbd21309710d2ef5a19ebf2d532d7b10
but still i am not able to wrap.I am using Datasource to fetch data from DB using JDBC mysql driver.we create dataset by querying database and create Table(used Table as report Item from pallete to design) with columns return in dataset.i have set whitespace option to normal in property Editor and in the Properities panel(Table,Row,column) but still not helping.
JasonW
Does the text have white space? Can you attach a screenshot? Also delete the data item and try the dynamic text report item for the column values.
Jason
harsimran
there is no white space.i will try with dynamic text report.i will attach snapshot in next reply
thanks
harsimran
Find attached snapshot and sample rpt file.Dynamic text also returning same.
JasonW
With no whitespace in the text you will have to use something like this in a text element with type set to html:
<div STYLE="word-wrap: break-word">row["col"]</div>
or add a newline to the text with a javascript function. See this thread:
http://www.birt-exchange.org/org/forum/index.php/topic/19827-how-do-i-use-word-wrap-in-report-design/page__s__ad0bb32bbbac95aee7b5556149417a73
eg:
function wrap(longStr,width){
length = longStr.length;
if(length <= width)
return longStr;
return (longStr.substring(0, width) + "\n" + wrap(longStr.substring(width, length), width));
}
Jason
Nithi
Still Word wrapping is not happening in pdf when rendered through BIRT
mwilliams
Can you create an example (that I can run) that shows your issue and what you've tried to get it to work?