Text not correctly wrapped if margin is set

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

Text not correctly wrapped if margin is set

Post by ChrisDA »

Hi,

if a left margin is set on a text component with a fixed width and Word Wrap = true, then the width of the content in that component is not adjusted to the left margin.
The total width of the component (from border to border) becomes MARGIN + WIDTH instead of only WIDTH.

Let's assume a text component with a width of 3cm and a left margin of 25px.
If the text in that component is long, then it isn't wrapped at the border of the component, but to the right of the border.
This results in some letters not being displayed because they disappear behind the adjacent text component to the right.

Please take at look at the attached screenshots.
You can see that the letters N, O, and P aren't displayed because they are behind the next text component instead of in the next line.
The second line should start with N, not with Q.

The second screenshot shows Chrome's developer tools.
You can see that the inner div's width is not adjusted based on the left margin.
The actual width of the inner div should be the desired width (3cm) minus any margins (in this case 25px) so that the text is wrapped at the right border.

Do you have a solution for this problem (Version 2016.2)?

Regards,
Chris
Attachments
margin1.png
margin1.png (2.57 KiB) Viewed 2080 times
Chrome dev tools
Chrome dev tools
margin2.png (4.17 KiB) Viewed 2080 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Text not correctly wrapped if margin is set

Post by Alex K. »

Hello,

Could you send us a simple report which reproduces the issue for analysis?
Also, please clarify which component(viewer) do you use?

Thank you.
ChrisDA
Posts: 10
Joined: Wed Oct 12, 2016 8:09 am

Re: Text not correctly wrapped if margin is set

Post by ChrisDA »

Hi,

I've attached an example report. We're using StiMvcViewer.

After further research, the issue might be related to the "Vertical Alignment" setting of the text component. The issue appears if Vertical Alignment is set to "Center".

Thanks in advance.

Chris
Attachments
Report.mrt
(3.6 KiB) Downloaded 342 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Text not correctly wrapped if margin is set

Post by Alex K. »

Hello,

Thank you for the detail description.
We need some time to fix the issue. We will let you know when the solution is available.

Thank you.
Lech Kulikowski
Posts: 6265
Joined: Tue Mar 20, 2018 5:34 am

Re: Text not correctly wrapped if margin is set

Post by Lech Kulikowski »

Hello,

The issue is fixed. The fix will be available in the next release build.

Thank you.
Post Reply