Convert html texts into readable text for end user

Hey guys,

I use FastReport.Net version 1.2.47. And I have a query that brings text typed and formatted in my application that uses CKEditor and, when recorded in the database, it takes all the html formatting characters. The issue is that when generating my report the content comes with all html characters and I am not able to convert it to readable text for the user. Here's how the text is coming out:

=================================================================

<p dir="ltr" style="line-height:1.7999999999999998;text-align: justify;margin-top:0pt;margin-bottom:0pt;">

<font color="#000000" face="Arial"><span style="font-size: 16px; white-space: pre-wrap;">Prezado Diretor Presidente,</span></font></p>

<p dir="ltr" style="line-height:1.7999999999999998;text-align: justify;margin-top:0pt;margin-bottom:0pt;">

&nbsp;</p>

<p dir="ltr" style="line-height:1.7999999999999998;text-align: justify;margin-top:0pt;margin-bottom:0pt;">

<font color="#000000" face="Arial"><span style="font-size: 16px; white-space: pre-wrap;">Este &eacute; um modelo de documento criado para apresenta&ccedil;&atilde;o. Nele &eacute; poss&iacute;vel:</span></font></p>

<p dir="ltr" style="line-height:1.7999999999999998;text-align: justify;margin-top:0pt;margin-bottom:0pt;">

<strong><font color="#000000" face="Arial"><span style="font-size: 16px; white-space: pre-wrap;">Redigir textos longos</span></font></strong></p>

<p dir="ltr" style="line-height:1.7999999999999998;text-align: justify;margin-top:0pt;margin-bottom:0pt;">

<font color="#000000" face="Arial"><span style="font-size: 16px; white-space: pre-wrap;">Existem muitas varia&ccedil;&otilde;es das passagens do Lorem Ipsum dispon&iacute;veis, mas a maior parte sofreu altera&ccedil;&otilde;es de alguma forma, pela injec&ccedil;&atilde;o de humor, ou de palavras aleat&oacute;rias que nem sequer parecem suficientemente cred&iacute;veis. Se vai usar uma passagem do Lorem Ipsum, deve ter a certeza que n&atilde;o cont&eacute;m nada de embara&ccedil;oso escondido no meio do texto. Todos os geradores de Lorem Ipsum na Internet acabam por repetir por&ccedil;&otilde;es de texto pr&eacute;-definido, como necess&aacute;rio, fazendo com que este seja o primeiro verdadeiro gerador na Internet. Usa um dicion&aacute;rio de 200 palavras em Latim, combinado com uma d&uacute;zia de modelos de frases, para gerar Lorem Ipsum que pare&ccedil;am razo&aacute;veis. Desta forma, o Lorem Ipsum gerado &eacute; sempre livre de repeti&ccedil;&atilde;o, ou de injec&ccedil;&atilde;o humor&iacute;stica, etc.</span></font></p>

<p dir="ltr" style="line-height:1.7999999999999998;text-align: justify;margin-top:0pt;margin-bottom:0pt;">

&nbsp;</p>

<p dir="ltr" style="line-height:1.7999999999999998;text-align: justify;margin-top:0pt;margin-bottom:0pt;">

<font color="#000000" face="Arial"><span style="font-size: 16px; white-space: pre-wrap;">Criar tabela</span></font></p>

<table border="1" cellpadding="1" cellspacing="1" style="width: 500px">

<tbody>

<tr>

<td>

<strong>COLUNA 1</strong></td>

<td>

<strong>COLUNA 2</strong></td>

</tr>

<tr>

<td>

Existem muitas varia&ccedil;&otilde;es das passagens do Lorem Ipsum dispon&iacute;veis, mas a maior parte sofreu altera&ccedil;&otilde;es de alguma forma, pela injec&ccedil;&atilde;o de humor, ou de palavras aleat&oacute;rias que nem sequer parecem suficientemente cred&iacute;veis.</td>

<td>

Se vai usar uma passagem do Lorem Ipsum, deve ter a certeza que n&atilde;o cont&eacute;m nada de embara&ccedil;oso escondido no meio do texto.</td>

=================================================================

I've already tried using the Text component with the HtmlTag and Wysiwyng properties equal to True and the Formatted Text component, but the result is the same.

Would anyone have a solution for this?

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.