Blog

Use HTML in Crystal Reports to format formula field

Aug 29, 2011 Blogs | Crystal Reports C#
Integrate HTML tags with your Crystal Report formula fields to format your content dynamically. I gave a simple example for how to bold a selected text using <b></b> Html tag in Crystal Report.
If you want to bold, italic or under-line a text, then you can use Html support in crystal report. Also you can enjoy other features of html in crystal report  by using html tags. Here i am showing very simple example how to bold selected text in formula field using HTML. Try this one,

create a new formula -> (Enter the following text in your formula editor) ,
    
'<b>TRIPLICATE</b> - For Authorised Dealer's record. '

Here i enclosed the text with Single Quotes ( ' ' ) because i am going to print a static content in crystal Report. If you want to format a Field from DataSource (dynamic Content), You can change the Code to 

'<b>'+{ DataSourceName.DataSourceColumnFieldName }+'</b>'
 
Place your Formula Field in Crystal Report, then right click on the field and select Format Object

Untitled-7.gif

select Paragraph tab
Change Text Interpretation Combo Box Option to "HTML Text"


Run your Report,  you will get the following result

TRIPLICATE - For Authorised Dealer's record.

Thank you. if you have any Suggestions and Comments about my blog, Please let me know.
Prabhu Raja

For more about me, www.prabhuraja.com

Personal Blog: http://www.prabhuraja.com
  • 116rank
  • 747K readers
COMMENT USING

PREMIUM SPONSORS

Hire Mobile & Web Developer on demand. 100% satisfaction. Try for 1 week or Money Back. Local and remote developers available all over USA.

Latest Blogs