Home
Analytics
New line tag in Birt?
alex09
I'm using a SQL function that returns a string. I need to split the string within the Birt report and start new line at specific places. I tried the following tags but none of them seems to be doing the job:
<p>
'n'
Is there any tag that I can include in the SQL statement to start a new line in the Birt report?
Find more posts tagged with
Comments
bhanley
Where are you applying the line break logic? In the SQL? If so you should be able to use a Text item to do what you are looking for.<ul class='bbcol decimal'><li> Create your data set, embed HTML Break tags (<BR>) where needed</li><li> Add a table to your report (I assume you are controlling layout with a table, it is not required), add all the data elements you need except the one with the special formatting that will be handled next.</li><li> Now drag over a <strong class='bbc'>Text</strong> item into the table cell where you want your text with the embedded line breaks to appear</li><li>On the Text Item formatting window, select <strong class='bbc'>HTML</strong> from the formatting drop-down at the top of the window.</li><li>On the other drop-down, select <strong class='bbc'>Dynamic Text</strong> </li><li>Now click on <strong class='bbc'><VALUE-OF></strong>. This will open the Expression Editor. Select your formatted field.</li></ul>That should do it. Your text will be rendered and will honor the HTML formatting controls.If you want to apply the line break logic after the SQL executes, you can do that too, using nearly the same logic except you will do a bit more processing in the expression editor, likely using a few regular expressions. Let me know if we need to go down that road, I am happy to help.Good Luck!!
alex09
Thanks a lot! That was excatly what I wanted!<blockquote class='ipsBlockquote' data-author="bhanley"><p>Where are you applying the line break logic? In the SQL? If so you should be able to use a Text item to do what you are looking for.<ul class='bbcol decimal'><li> Create your data set, embed HTML Break tags (<BR>) where needed</li><li> Add a table to your report (I assume you are controlling layout with a table, it is not required), add all the data elements you need except the one with the special formatting that will be handled next.</li><li> Now drag over a <strong class='bbc'>Text</strong> item into the table cell where you want your text with the embedded line breaks to appear</li><li>On the Text Item formatting window, select <strong class='bbc'>HTML</strong> from the formatting drop-down at the top of the window.</li><li>On the other drop-down, select <strong class='bbc'>Dynamic Text</strong> </li><li>Now click on <strong class='bbc'><VALUE-OF></strong>. This will open the Expression Editor. Select your formatted field.</li></ul>That should do it. Your text will be rendered and will honor the HTML formatting controls.If you want to apply the line break logic after the SQL executes, you can do that too, using nearly the same logic except you will do a bit more processing in the expression editor, likely using a few regular expressions. Let me know if we need to go down that road, I am happy to help.Good Luck!!</p></blockquote>
nikhil_n
Hi Alex,
I have the same requirement to be implemented in an E-Spreadsheet report? Is there any way to do this in ESpreadsheet report?
I am pulling all data columns to the Data set of the report using a stored procedure. Out of it some columns have lengthy string, which I need to split in to separate lines and need to put few portion of the string in bold face. Is there any way to achive it in eSpreadsheet designer?
I tried to put the
text in between the strings in the stored procedure, while returning the result set to data set. But it is not working.
Thanks in advance.
Nikhil
nikhil_n
Hi bhanley,
I have the same requirement to be implemented in an E-Spreadsheet report? Is there any way to do this in ESpreadsheet report?
I am pulling all data columns to the Data set of the report using a stored procedure. Out of it some columns have lengthy string, which I need to split in to separate lines and need to put few portion of the string in bold face. Is there any way to achive it in eSpreadsheet designer?
I tried to put the
text in between the strings in the stored procedure, while returning the result set to data set. But it is not working.
Thanks in advance.
Nikhil