HTMLTEXTBOX CUTOFF CONTENT

1 Answer 40 Views
.NET Framework HTMLTextBox Report Designer - Web Report Parameters Report Viewer - MVC Report Viewer - Silverlight Styling
Sunkam
Top achievements
Rank 1
Sunkam asked on 28 Jun 2021, 03:08 PM | edited on 29 Jun 2021, 12:54 PM

I'm using Telerik Reporting 7.0.13.220.

When I create an HtmlTextBox on a report and set the CanGrow property to true, it will output the following HTML/CSS in the web viewer:

.s10 {font-family:Segoe UI;font-size:11px;color:Black;word-wrap:normal;white-space:nowrap;padding-left:0px;padding-right:1px;padding-top:0px;padding-bottom:-2px}

<div title="" class="htmltextbox1 .s10" style="position:absolute;overflow:hidden;left:634px;top:69px;width:363px;height:77px;">
  <div class="html-root" style="margin-top:0px;">
    <p class="s1">content</p>
  </div>
</div>

When the white-space attribute is set to "nowrap" longer lines in the HtmlTextBox are cut off and do not display properly.  When I remove the white-space attribute using Chrome's developer tools, the content displays correctly.  Since this CSS is coming from an .axd request and is generated from the web viewer's iframe, I cannot override this value.  Is there a workaround for this?

Code in Designer :

        Me.HtmlTextBox1.Name = "HtmlTextBox1"
        Me.HtmlTextBox1.Size = New Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(1.9530130624771118R), Telerik.Reporting.Drawing.Unit.Inch(0.34999999403953552R))
        Me.HtmlTextBox1.Style.BorderColor.Default = System.Drawing.Color.LightGray
        Me.HtmlTextBox1.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid
        Me.HtmlTextBox1.Style.BorderWidth.Default = Telerik.Reporting.Drawing.Unit.Point(0.5R)
        Me.HtmlTextBox1.Style.Visible = True
        Me.HtmlTextBox1.Value = "<span style=""word-wrap: break-word;white-space: normal; "">{Replace(Fields.descr_corr_action_descr, ""&""" &
    ", ""&amp;"")}</span>"

descr_corr_action_descr this property is using two columns in database 

pls provide solution how  to remove white-space:nowrap; or provide any workaround solution 

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 30 Jun 2021, 08:08 AM

Hi Sunkam,

Thank you for the provided information.

I tried to create a report that reproduces the issue but so far have been unable to do so.

I noticed that you are using a pretty old version of Telerik Reporting, over the years we have made a lot of improvements on the HtmlTextBox item and the rendering of the reports, I strongly recommend upgrading your project to a newer version and testing again to see if the issue is still reproducible.

With that being said, what could cause the cut-off text is the differences in the way different browsers' layout engines interpret fonts and their sizes. If the issue is reproducible even on newer versions, please try changing the font and font size to work around the issue.

Thank you for using Telerik Reporting!

Regards,
Dimitar
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Tags
.NET Framework HTMLTextBox Report Designer - Web Report Parameters Report Viewer - MVC Report Viewer - Silverlight Styling
Asked by
Sunkam
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or