Follow

Using HTML tags in text

Please set the AllowHtmlTags property of text component to true. Then you can use some HTML tags in the text expression. List of supported HTML tags can be checked below:

 <b> </b>
 <i> </i>
 <u> </u>
 <s> </s>
 <sub> </sub>
 <sup> </sup>
 <strong> </strong> // same as<b>
 <em> </em> //same as <i>
 <strike> </strike> //same as <s>

 

<color="#rrggbb"> </color>
<background-color="#rrggbb"> </background-color>

 

<font color="#rrggbb" face="FontName" size="1..n"> </font>
<font-face="FontName"> </font-face>
<font-name="FontName"> </font-name>
<font-family="FontName"> </font-family>
<font-size="1..n"> </font-size>
<font-color="#rrggbb"> </font-color>

 

<letter-spacing="0"> </letter-spacing>
<word-spacing="0"> </word-spacing>
<line-height="1"> </line-height>
<text-align="left"> </text-align> //center, right, justify


<br> <br/>
<p> </p>

 

 <ul> </ul>
 <ol> </ol>
 <li> </li>
 attribute "type" for 'ul', 'ol', 'li'

 

 <a href="...">…</a>

 

Attribute "style" now support: 
color
background-color
text-decoration: underline line-through none
font-weight: bold normal
font-style: normal italic
font-size
font-face, font-family, font-name
vertical-align: baseline sub super
letter-spacing: normal x.x
word-spacing: normal x.x
line-height: normal x.x
text-align: left center right justify
"margin-top", "margin-bottom"; and "margin" but only applied for top and bottom //for <p> tag only


 &amp; &lt; &gt; &quot; &apos; &nbsp; &#xxxx;

 

Color formats: #rrggbb #rgb rgb(r,g,b)
Font name formats: name name1,name2

 

Also as a way you could open the HTML text, that you want to add to a report, in the Word and save it in the rtf file.
Than you could use this file in the Rich text component of the report.

If you want to export your rendered report to HTML, you could set next static option

StiOptions.Export.Html.ReplaceSpecialCharacters = false;

Please check the sample report.

3 Comments

  • Avatar
    Edward Pat

    Hi Eugen,

    Unfortunately, we do not support CSS in 'a traditional way' for the report engine. Please have a read on some additional examples on the above list of tags we support (there are also some child nodes for the parent topic);

    https://www.stimulsoft.com/en/documentation/online/user-manual/report_internals_html_tags.htm

    Thank you,
    Edward

  • Avatar
    Eugen Walcher

    Is it possible to change the css style of each of these HTML tags?  I need to adjust the CSS of the <sup> tag using style="...;" but can't get it to apply in the designer.

  • Avatar
    mukeshjh52

    Thanks Team to share the useful info........

Please sign in to leave a comment.