BusinessObjects Board

How to insert carriage return

I have a WebI report that has a long text field. Within a single cell I want the text to be separated by a carriage return: char(10). My goal is to have the carriage return in the datasource so that I don’t need any variablesor logic in the report. If the text contains char(10) will webI recognize that?

For example:
text_var = “This is paragraph one char(10) This is paragraph two”

Desired output in single cell:
This is paragraph one
This is paragraph two

I’m not sure. You can always try it. It won’t hurt anything.

1 Like

Your variable would need to be…

="This is paragraph one" + char(10) + "This is paragraph two"

I would advise against storing carriage returns in the data unless you want every consumer of that data to see it that way. Generally, you do not want to impose your report requirements on the source data.

If your query is a based on a universe, you could create an object that has the carriage return within it. If your query is free-hand SQL, you could insert the carriage return within it as well. The bigger question is how do you decide where to put the carriage return within your text?

1 Like

I’d just add that while I typically use Char(10), it can occasionally lead to strange behavior where text won’t wrap. It’s pretty rare I come across this, but when I do Char(13) seems to resolve it. But in most situations you’ll want to use Char(10).

set a unique character (e.g. pipe | ) in your longtext to indicate a new line,
than you can replace this character within a WebI-formula with char(10)

1 Like