This is a migrated thread and some comments may be shown as answers.

Line Break in A Text Box

5 Answers 2841 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Suriya
Top achievements
Rank 1
Suriya asked on 13 Mar 2009, 05:31 AM
Hi..
     Sir now i had doubt in displaying 3 fields in a single text box., I am used can grow property also.,
but i didn't get a clear output.,i must need the line break keyword  like "/n" or some other//

Example :

             i need output as

                    Bill No,
                    Bill Name,
                    Narantion...
in a single textbox...
I want to break the line automatically when 1 field ends & the 2nd field must display in the new line..


or

Give any tips to decrease or increase the height of detail band in the run time..

Thanks

By
Suriya

5 Answers, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 13 Mar 2009, 10:23 AM
Hello Suriya,

While there are several ways to accomplish a multi-line text output with many data-bound fields inside a single TextBox, probably the simplest and the most straightforward approach is to use embedded expressions, which are new to the Q1 2009 release. With embedded expressions you can achieve fairly easy a mail merge like functionality in your reports. Just enter the desired text in the Expression Editor dialog, and enclose all your data-bound expressions in curly brackets, like this: "Some text {some expression}". You can add line breaks in the text using the Ctrl+Enter key combination. For further reading about the embedded expression you can refer to our online documentation. I have also attached a small test report that illustrates the usage of embedded expression to output a multi-line text within a single text box.

Best wishes,

the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Siva
Top achievements
Rank 1
answered on 12 Jul 2012, 12:27 PM
hi ivan ,i am using Q2-2012, i also looking for line breaking , i using in html textbox  line1<br/>line<br/>line3, but it's not working .

any other solution for this release. 

0
IvanY
Telerik team
answered on 17 Jul 2012, 07:17 AM
Hi Siva,

Please make sure that you input the HTML code in the Html view and not in the Design view. By default the HtmlTextBox editor starts in the Design view where you enter text and format it using the provided tools; switching to the Html view (the button is situated in the upper left part of the expression builder) you can edit the markup.
 
All the best,
IvanY
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
Mark
Top achievements
Rank 1
answered on 14 May 2014, 09:11 PM
I was wondering if anyone can tell me how to do this? I want all of my data in one textbox and I want to use a new line for each line that I need on a new line. However, If a field is empty I don't want a blank space in the textbox I want the next field to go there.
This is my expression so far. The field CompanyName2 is "" so I want the field CompanyAddr1 to display in it's place. I need to be able to use the IIf() function.

=IIf(Fields.CompanyName2 <> "", Fields.CompanyName2, "")+"
"+Fields.CompanyAddr1 + "  " + Fields.CompanyAddr2+"
"+Fields.CompanyCity + ", " + Fields.CompanyState + ". " + Substr(Fields.CompanyZip,0,5)+"
"+"Phone: " + Fields.CompanyPhone + " " + IIf(Trim(Fields.CompanyFax) <> "(___) ___-____", " Fax: " + Fields.CompanyFax, "")+"
"+"Email: " + Fields.CompanyEmail + " " + IIf(Fields.CompanyWebSite <> "", "Web: " + Fields.CompanyWebSite, "")

Thank you,
Mark
0
Hinata
Top achievements
Rank 1
answered on 19 May 2014, 02:41 PM
Hi Mark,

There are two options that I can think of right now:

1. Use the HtmlTextBox to insert a new line for each line that you need. You can insert it conditionally, by checking if the Fields.MyField is Null with the Iif function.
2. Place multiple TextBox items in a column. Then check if the field displayed in a TextBox is Null. If it is, hide the TextBox item using Conditional Formatting. The TextBoxes below will take up the empty space left by the hidden one.



Tags
General Discussions
Asked by
Suriya
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Siva
Top achievements
Rank 1
IvanY
Telerik team
Mark
Top achievements
Rank 1
Hinata
Top achievements
Rank 1
Share this question
or