Home
Analytics
Display Text as HTML
bachi
Hi,
I have a report and I am displaying large text from database so text has html tags because that text is from textarea. How can I display that text as html?
Thanks in advance for help.
Find more posts tagged with
Comments
EricB
<blockquote class='ipsBlockquote' data-author="'bachi'" data-cid="96966" data-time="1330466690" data-date="28 February 2012 - 03:04 PM"><p>
Hi,<br />
<br />
I have a report and I am displaying large text from database so text has html tags because that text is from textarea. How can I display that text as html?<br />
<br />
Thanks in advance for help.<br /></p></blockquote>
The Text report element has an option to display the text as HTML. Within there, an expression can exist within the VALUE-OF tags. Something like the attached image.<br />
<br />
Hope that helps,<br />
<br />
Eric
bachi
Hi,<br />
<br />
Thanks for your response.<br />
<br />
I am sorry I did not mention that I am using dataset to get the data and am using table.<br />
<br />
Here is current expression looks like<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>var val;
if(dataSetRow["PLAN"] != null){
val = dataSetRow["PLAN"];
}
else{
val="None Reported";
}
val;
</pre>
<br />
Thanks for your help in advance.
CBR
where did you put this expression?
On the data item?
You can switch display type of dynamic text (i m assuming that the expression is in a dynamic text) to HTML. Just click on the dynamic text item and have a look at the general section of the property editor.
bachi
Hi,
Thanks for your quick response I put that expression in data element not the dynamic text.
CBR
From all i know a data element can't be changed to interpret HTML.
You need to do it using a Text (as mentioned before) or a dynamic text.
Just put a dynamic text in the same cell as the original data item and set it's value to row["..."]
Remove the data element (it is required in the data binding so do not remove it from the bindings) afterwards.
bachi
Hi,
Thanks I have fixed it by changing data element to dynamic text.