Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » SQL Text and Birt formating
SQL Text and Birt formating [message #650310] Mon, 24 January 2011 10:55 Go to next message
Ville Kaukonen is currently offline Ville KaukonenFriend
Messages: 19
Registered: January 2011
Junior Member
Hello,

I am reading a text type column from MS Sql database to Birt. On HTML everything looks fine but when I print it to PDF the text doesn't look ok anymore.

In PDF I don't get any line changes.

Datatype for the Birt element is String.

edit: Actually in PDF I only get the first line.

[Updated on: Mon, 24 January 2011 11:10]

Report message to a moderator

Re: SQL Text and Birt formating [message #650391 is a reply to message #650310] Mon, 24 January 2011 17:16 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

What is in the text?

Jason

On 1/24/2011 5:55 AM, Ville Kaukonen wrote:
> Hello,
>
> I am reading a column text from MS Sql database to Birt. On HTML
> everything looks fine but when I print it to PDF the text doesn't look
> ok anymore.
> In PDF I don't get any line changes.
> Datatype for the Birt element is String.
>
Re: SQL Text and Birt formating [message #650466 is a reply to message #650391] Tue, 25 January 2011 06:44 Go to previous messageGo to next message
Ville Kaukonen is currently offline Ville KaukonenFriend
Messages: 19
Registered: January 2011
Junior Member
Basically it's text saved from normal html text box to database. It's in MS SQL Text type column.

So I believe that text comes with char(13)+char(10) line changes. Or atleast that has been common earlier. I tried to replace those marks in Birt with a placeholder, but I saw no replacement. dataSetRow["Lis├Ątietoja"].replace(String.fromCharCode(13)+String.fromCharCode(10), "</ br>")

Also I tested to export the document to word. There the lines changes worked just fine.

http://gdp.kapsi.fi/pics/Birt_problem.JPG

Example of my problem.

[Updated on: Tue, 25 January 2011 07:42]

Report message to a moderator

Re: SQL Text and Birt formating [message #650589 is a reply to message #650466] Tue, 25 January 2011 15:48 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

I did not get the attachment. Are you using a text box or a dynamic
text box report item in the design to display it?

Jason

On 1/25/2011 1:45 AM, Ville Kaukonen wrote:
> Basically it's text saved from normal html text box to database. It's in
> MS SQL Text type column.
> So I believe that text comes with char(13)+char(10) line changes. Or
> atleast that has been common earlier. I tried to replace those marks in
> Birt with a placeholder, but I saw no replacement.
> Also I tested to export the document to word. There the lines changes
> worked just fine.
>
>
> Example of my problem.
Re: SQL Text and Birt formating [message #650696 is a reply to message #650589] Wed, 26 January 2011 07:02 Go to previous message
Ville Kaukonen is currently offline Ville KaukonenFriend
Messages: 19
Registered: January 2011
Junior Member
Alright!

Yeah I had just drag and dropped the data set from the data source menu to the project. Now I added a new Dynamic Text box and bind it to data source. I actually had tried this before, but i got reference errors. Now that I did the biding correctly on the dynamic textbox, the text output was like magic.

So problem solved. Thank you very much.

[Updated on: Wed, 26 January 2011 08:12]

Report message to a moderator

Previous Topic:Properties file
Next Topic:Round average aggregation on chart
Goto Forum:
  


Current Time: Thu Dec 18 21:16:15 GMT 2014

Powered by FUDForum. Page generated in 0.08482 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software