Search code examples
c#asp.netsql-serverreportrdlc

How to bind html to an rdlc file


I have text stored in a column of a table within my database, with html tags .

Example :

 <table><tr><td> hello </td></tr></table>

I am binding the text to the website and it works perfectly. It gets displayed as

   hello 

on the website.

Now I would like to create a rdlc report and am binding the same dataset to the report. But I see :

 <table><tr><td> hello </td></tr></table>

on the report instead of

hello

I think I understand why this is happenning , because the rdlc file cannot render html. But is there a way that I can see "hello" on the website. ? Please let me know if you know of any other way to do it .


Solution

  • you can render using HTML tags in RDL as follows :

    1. Left click the field you want to display so that the <Expr> tag is highlighted
    2. Right click the highlighted <Expr> tag and choose Placeholder Properties...
    3. On the General tab, select the HTML- Interpret HTML tags as style radio button

    enter image description here