Page 1 of 1

Word Wrap setting doesn't work

Posted: Wed Oct 12, 2016 8:52 am
by ChrisDA
Hi,

we're using Stimulsoft Reports version 2016.2.

The "Word Wrap" setting of text components doesn't seem to work properly in either the StiMvcMobileDesigner or the StiMvcViewer.

It doesn't matter if the component contains a fixed text or an expression. If the text doesn't contain spaces (for example), the component just grows horizontally completely ignoring the set width. It doesn't truncate the text either (which is what should happen by default according to the documentation), it just shows everything in one line ruining the report's layout.

I need a text component with a fixed width no matter how long the actual text in there is. If the text is too long, it should break and cause the component to grow vertically.

The Word Wrap setting seems to work in the StiMvcDesignerFx, but using Flash is not an option for us.

I've attached 3 screenshots to illustrate the problem.
The first screenshot shows the designer view with a fixed text component containing a long string.
The second screenshot shows the respective preview and that the text isn't wrapped (even though the setting is true).
The third screenshot shows how it should look.

Is there any solution to this problem?

Regards,
Chris

Re: Word Wrap setting doesn't work

Posted: Wed Oct 12, 2016 3:33 pm
by HighAley
Hello.

This is an feature of the browsers.
They can't add word wrap if there is no space.
And the component grow in width to fit all the text.

As workaround, if the text is without spaces, you could set the UseStrictTableCellSize option in the Begin Render event of the report.

Code: Select all

StiOptions.Export.Html.UseStrictTableCellSize = true;
Please, look at the attached report template.
Report(13).mrt
(17.22 KiB) Downloaded 775 times
Thank you.

Re: Word Wrap setting doesn't work

Posted: Thu Oct 13, 2016 6:56 am
by ChrisDA
Hi,

thank you for the fast response.

I've tried the mrt file you provided, but it shows the same behavior (see screenshot). The text isn't wrapped. Could this be related to CalculationMode "Interpretation"?
HighAley wrote: This is an feature of the browsers.
They can't add word wrap if there is no space.
What about the CSS property word-break?

The report viewer seems to create tables and word-break should work on TD tags.

Please review this small fiddle: https://jsfiddle.net/c7jmdmgm/

Thanks in advance.

Chris

Re: Word Wrap setting doesn't work

Posted: Thu Oct 13, 2016 2:12 pm
by HighAley
Hello.

Yes, if you set the Interpretation mode, the text will not be wrapped.
Your opinion is very important for us.
We will pass this information to our developers.

Thank you.

Re: Word Wrap setting doesn't work

Posted: Mon Jul 23, 2018 11:33 am
by HighAley
Hello.

We have made several improvements to the WordWrap property.
Please, check our latest build.

Thank you.

Re: Word Wrap setting doesn't work

Posted: Tue Aug 11, 2020 8:26 am
by CWS116
Hello.

Word Wrap doesn't work when the Print On All Pages of Column Footer Or Footer set to True
Please help.

Thank you.

Re: Word Wrap setting doesn't work

Posted: Wed Aug 12, 2020 5:18 pm
by Lech Kulikowski
Hello,

Thank you for the detailed information.