Skip to main content



      Home
Home » Archived » BIRT » Removing carriage returns from a column output
Removing carriage returns from a column output [message #1059117] Thu, 16 May 2013 16:07 Go to next message
Eclipse UserFriend
So I have been searching for a few hours on this and the problem mainly stems from the fact that I'm a new user Rolling Eyes .

I have my query written, I have the output working with the exception of some of the results that are returned. Basically I have a large string of text (It's XML code in one column) that I have cut off with no word wrap on the results. The issue occurs whenever there is a carriage return in the XML itself, it will cause the display to show several lines and it looks like the "no word wrap" doesn't work.

The solution I had in my head initially was to write in the sql query itself to find carriage returns and replace them with spaces. This works in my normal SQL program but for some reason Birt doesn't execute this properly. replace(replace(MESSAGE_BODY, char(13), ''), char(10), '') AS FOD

The next thing I thought I could maybe use to solve this is by using the expression builder but my lack of javascript knowledge has prevented me from going any further with this solution.

Any help on this would be very much appreciated.
Re: Removing carriage returns from a column output [message #1059408 is a reply to message #1059117] Sat, 18 May 2013 00:28 Go to previous messageGo to next message
Eclipse UserFriend
One thing you could do would be to write an expression like this in a computed column:

myText = row["yourXML"];
while(myText.indexOf(breakcharacter) != -1){
myText = myText.replace(breakcharacter,"");
}
myText;


Then, you'd use this new column in your table.
Re: Removing carriage returns from a column output [message #1059595 is a reply to message #1059408] Mon, 20 May 2013 12:45 Go to previous messageGo to next message
Eclipse UserFriend
Thank you so much for your response. While I think this is exactly the type of solution that I am looking for, I get the following error message when I run the query after adding this expression to the column:

org.eclipse.birt.report.engine.api.EngineException: Binding "FOD" has dependency cycle.

Re: Removing carriage returns from a column output [message #1059642 is a reply to message #1059595] Tue, 21 May 2013 01:18 Go to previous message
Eclipse UserFriend
Any way you can recreate this issue in a way that I can run the report, so I can test on it? Thanks!
Previous Topic:Date parameter not Working
Next Topic:how to get listbox in <birt:viewer>
Goto Forum:
  


Current Time: Fri Mar 21 04:24:35 EDT 2025

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

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

Back to the top