Word Wrap setting doesn't work

Stimulsoft Reports.WEB discussion
Post Reply
ChrisDA
Posts: 10
Joined: Wed Oct 12, 2016 8:09 am

Word Wrap setting doesn't work

Post 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
Attachments
Design view, Word Wrap enabled
Design view, Word Wrap enabled
StiMvcMobileDesigner.png (84.14 KiB) Viewed 4834 times
Actual preview result, text doesn't wrap
Actual preview result, text doesn't wrap
StiMvcMobileDesigner-preview.png (11.97 KiB) Viewed 4834 times
Expected preview result
Expected preview result
StiMvcDesignerFx-preview.png (6.73 KiB) Viewed 4834 times
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Word Wrap setting doesn't work

Post 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 479 times
Thank you.
ChrisDA
Posts: 10
Joined: Wed Oct 12, 2016 8:09 am

Re: Word Wrap setting doesn't work

Post 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
Attachments
preview.png
preview.png (8.65 KiB) Viewed 4817 times
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Word Wrap setting doesn't work

Post 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.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Word Wrap setting doesn't work

Post by HighAley »

Hello.

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

Thank you.
User avatar
CWS116
Posts: 8
Joined: Wed Jun 24, 2020 12:53 pm

Re: Word Wrap setting doesn't work

Post 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.
Lech Kulikowski
Posts: 6247
Joined: Tue Mar 20, 2018 5:34 am

Re: Word Wrap setting doesn't work

Post by Lech Kulikowski »

Hello,

Thank you for the detailed information.
Post Reply