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

Problem with line breaks / MultiLine TextBox in Excel export

5 Answers 364 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Fridli Jacober
Top achievements
Rank 1
Fridli Jacober asked on 09 Oct 2015, 10:34 AM

Hello together

I have the issue, when MultiLine is set to true and having a text with line breaks in it, this gives additional rows in excel which makes it unusable for use for serial letters.
When having MultiLine set to false on the other side and having a text with line breaks in it, it gives an unknown character (�) which isn't cool either.

Any advice? Feature / bug request?

Thx & Regards

5 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 13 Oct 2015, 03:47 PM
Hi Fridli,

The reason to have additional rows when TextBox.Multiline is left to true(the default value), may be improper aligning of items. Using a Table item can resolve this as items in a  row will have the same height. More suggestions can be found in the Design Considerations for Excel Rendering help article.

When you set TextBox.Multiline to false, the content should be clipped - only the part in the available space should be visible. We logged for further investigation the issue with the symbol appearing at the place of the carriage return.



Thus my recommendation is to use TextBox.Multiline set to true. If you have any issues with this setting, please post code allowing us to build a report locally for test purposes.

Regards,
Stef
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Fridli Jacober
Top achievements
Rank 1
answered on 14 Oct 2015, 09:14 AM

Hi Stef

We can not use TextBox.Multiline set to true because there may not be any additional columns/fields when using as source for serial letters! But that's a good hint with the table, didn't see that.

"When you set TextBox.Multiline to false, the content should be clipped - only the part in the available space should be visible."
Visibly it's clipped but for good sake the whole content is still there when expanding the cell in excel (again use as source for serial letters).

Regards

0
Stef
Telerik team
answered on 16 Oct 2015, 03:30 PM
Hello Fridli,

The symbol appearing when the TextBox.Multiline property is set to false is an escape symbol for the new line in the string.


After discussing the question with our development team, it appears the TextBox.Multiline property is not applicable for TextBox items in the context of a static documents like reports. In reports, TextBox items only visualize data without accepting an input. There are properties like CanGrow, CanShrink and TextWrap which can control how the content of the item is visualized.

Thus the TextBox.Multiline property will be made obsolete in a consecutive release.

In your case:
  • If you want to hide the content only visually, you can use a combination of the TextBox item's CanGrow and TextWrap properties;
  • If you want to display only a specific part of the content, please use the built-in Text functions or a custom one to get a sub string from the original field's value.


If none of the above works in your scenario, please elaborate on the original TextBox value, how it looks on preview, and what result is actually expected on preview and in Excel.

Regards,
Stef
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Paul
Top achievements
Rank 1
answered on 19 Oct 2015, 05:42 PM

Stef:

 

Our project uses RadTextBox with TextMode="MultiLine". Everything has been fine until we upgraded to the latest Telerik version a week or two ago. Now our multiline textboxes are displaying two problems: 1) The EmptyMessage text doesn't go away when we click inside the multiline box, and 2) The text inside the multiline box seems to start with a carriage return - that is, it has a blank line at the beginning. I tried to find the cause (was it something we did to change our code), but came to the conclusion that it has to be the latest version of Telerik that we just downloaded. We have one page that our version control says hasn't been touched since December of last year. So code that hasn't been changed for 10 months is now acting squirly.

 

Do you have any information about this Telerik bug? Are there any work-arounds? Or should we go back to a previous version?

 

BTW, all of our multiline textboxes all started acting wrong all at once - immediately after upgrading to the latest version from Telerik.

 

Thank You,

- Paul

0
Stef
Telerik team
answered on 20 Oct 2015, 02:00 PM
Hello Paul,

This forum thread is regarding Telerik Reporting TextBox item which has a Multiline property as well.

Telerik UI for AJAX controls and Telerik Reporting items have different mechanism, thus please continue the discussion with my colleague in your support ticket on the same question.

Thank you for your understanding.

Regards,
Stef
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Fridli Jacober
Top achievements
Rank 1
Answers by
Stef
Telerik team
Fridli Jacober
Top achievements
Rank 1
Paul
Top achievements
Rank 1
Share this question
or