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
& < > " ' &#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