May 8, 2008 at 7:03 am
I have the situation where html is being stored in a column in a database and pulled back to a Report Server report as data and dropped into a textbox control. Rather than rendering the html, in this case displaying an image, the report prints the html out as a string literal like this: " ".
I understand from the digging I've done that this is by design but am looking for a work around and am running out of leads so I thought I'd put the question to all you smart fellers out there.
I searched this forum and found a similar question from a few years ago but no answer.
Thanks in advance,
dnash
May 12, 2008 at 8:46 am
I found a solution for this problem. Call this javascript function from the body onload event:
function HtmlReplace(){
var divs=document.getElementsByTagName("DIV");
for(var i=0;i<divs.length;i++){
divs.innerHTML=unescapeHTML(divs.innerHTML);
}
}
function unescapeHTML(s) {
return s.replace(/&/g,'&').replace(/</g,' ');
}
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply