Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Content removed after NewLine in PDF
A_Fejer
Hello everyone,
I think that I've found a bug in BIRT 2.6.1 while testing a report design that I created a few days ago.
I built the report design with the current release of Eclipse Helios IDE for Java and Report Developers.
The source of the report's data is a Microsoft SQL Server 2008 data base.
From this database I receive a dataset which I place into a table.
One column of the dataset has a text with NewLine-characters (in T-SQL those are known as CHAR(10)).
When I generate this report and watch it in the BIRT Viewer the data is displayed as it should be,
but if I view the same report in a PDF the text after the first NewLine-character is not there anymore.
If I recreate the same report with an older version like BIRT 2.5.2 for example, the problem isn't there anymore and the report is properly displayed in PDF.
If I the report created in the version 2.5.2 into the new Eclipse Helios IDE for Java and Report Developers
and generate the report without converting it into a newer version, the PDF is agains displayed as it should be.
Unfortunately I cannot reproduce this situation with the Classic Models sample DB, because it doesn't have no text with a NewLine-character, but I created a 2 screenshots to make it more clear.
PDF Output:
Find more posts tagged with
Comments
JasonW
Can you open a bug for this? Also can you post the two versions of the reprot 2.5.2 and 2.6.1?
Jason
A_Fejer
Hi Jason,
I would open a bug report, but unfortunately I have no experience with that, because I haven't done it before.
But if you tell me what to do, I might give it a try.
I extracted the essential part from the complex report design which I have created to focus on the issue.
I hope it's not a big deal that the names (procedures, column names) are in German.
Here are the 2 report designs:
JasonW
Is there any chance you can reproduce with the sample data? I compared the reports and saw nothing that should be causing this. Did you generate the pdfs from toolbar in the designer?
Can you increase the values in window->preferences->Report Design->Preview->Data?
Jason
A_Fejer
Hi Jason,
I managed to find a text containing NewLine-characters in the products table of the classic model.
Just to make sure that the result from the procedure that I use for the report,
I also tried getting the data from our data base with a normal select query.
I noticed an additional problem thanks to the sample DB. This is also visible in the HTML preview.
If you change the layout preference from auto to fixed, the line is cut off where the new line should begin.
It works fine in the 2.5.2 version.
I'm not sure if it's related to the previous problem, it doesn't change the PDF files.
Here are the 2 report designs using the sample DB:
JasonW
I replaced the data item for product description with a dynamic text element and it appears to fix the issue.
See attached reprot.
Jason
A_Fejer
Hi Jason,<br />
<br />
well that does solve the problem of the data not being shown, but the way I see it, <br />
now the text is converted into HTML and it doesn't interpret new lines.<br />
<br />
That can be fixed by writing a script to replace the new line and carriage return characters<br />
with simple HTML <br /> tags.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>(row["PRODUCTDESCRIPTION"] ).toString().replace("\n","<br />").replace("\r","<br />")</pre>
<br />
I think I'll stick to the version 2.5.2, but I'll keep an eye on new releases.<br />
<br />
Thank you for your time Jason.<br />
<br />
Andras Fejer