0
votes

can any one help me i wan to generate report (RDLC) by using following template ...

Dear [Name],

   you are able to generate this later. Kindly consider this.

<b>Regards</b>
<span style="color:blue">[CompanyName]</span>
[Address]-[City]

This is Dynamic template that Administrator can change it any time.. so i need to apply this dynamically that how can i add HTML in RDLC however [Name],[CompanyName],... that can be replace by me easily.. but i dnt knw hot i add HTML into RDLC.. ??

plz help me Thanks in advance...

2

2 Answers

1
votes

Add to your report one Label for every TAG, add in the value field a placeholder, like ="$CITY$"

When you process the RDLC report read it from the filesystem, find the placeholder and replace with the current value.

Reload the RDL xml into the reportViewer and execute the report.

More details on this post for details on how to dynamically modify reports stack overflow article

0
votes

I have been searched alot on google about HTML Formating in RDLC but couldn't find any proper answer.

I got one idea to render html tag in rdlc while you export locally in pdf.

Use below expression in textbox :-

=Replace(Replace(Replace(Replace(Fields!your column name*.Value,""",""""),"&","&"),"<","<"),">",">")

  1. &quot replaced by "(Quotes)
  2. &amp replaced by &
  3. &lt replaced by <
  4. &gt Replaced by >

so if you want replaced any more special charachter then just add more in above expression and it will take care of that.

I have taken care almost special charachters so whenever you export these in pdf they would be well formated as html tags.

If you still find any problem then let me know.

Thanks

Mahendra Singh