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

HtmlTextBox paragraphs

3 Answers 420 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 30 Jun 2017, 08:50 AM

Hi,

after adding following html paragraphs (1) to the HtmlTextBox value we are getting <p> tags converted to div and span (2) when report is rendered.

1) <p>first paragraph</p><p>second paragraph</p>

2) <div title="" class="htmlTextBox1 s1-" style="position:absolute;overflow:hidden;left:0px;top:309px;width:588px;height:48px;">

<div class="s2-" style="top:0px;left:3px;">
<span class="s3-">first paragraph</span>
</div>
<div class="s2-" style="top:33px;left:3px;">
<span class="s3-">second paragraph</span>
</div>
</div>

 

Is there a way to prevent this and keep original paragraph tags as they are? This makes incorrect height between lines and adds extra space after each text line.

 

Thanks

3 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 30 Jun 2017, 02:08 PM
Hi Peter,

The HTML input of the HtmlTextBox is not preserved. It is evaluated by the Reporting engine and it is turned into native elements for the selected rendering media (PDF, HTML for Web preview, Image for design-time preview, etc.).

Please check the supported HTML tags and CSS attributes which can be read by the Reporting engine - HtmltextBox item.
You may find interesting also How to render any HTML tags and CSS attributes in reports.

Regards,
Stef
Progress 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
Justas
Top achievements
Rank 1
answered on 21 Aug 2017, 10:20 AM
1.<div class="s2-" style="top:0px;left:3px;">
2.<span class="s3-">first paragraph</span>
3.</div>
4.<div class="s2-" style="top:33px;left:3px;">
5.<span class="s3-">second paragraph</span>
6.</div>
7.</div>

Hello,

I wanted to ask, how the builder decides how much one line should be further from top? in this case it's 33px for second line 66px for third and so on.

Is it possible to change it?

 

Thanks.

0
Katia
Telerik team
answered on 24 Aug 2017, 07:28 AM
Hello Justas,

Telerik Reporting HTML rendering extension tries to produce the layout as much close as possible to the one defined in the Report Designer, it will apply some default styles to the paragraphs.
To change the distance between the paragraphs you can use CSS attributes supported by HtmlTextBox item when setting the value of HtmlTextBox item in the designer.

 
Regards,
Katia
Progress 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
Peter
Top achievements
Rank 1
Answers by
Stef
Telerik team
Justas
Top achievements
Rank 1
Katia
Telerik team
Share this question
or