Wednesday, May 14, 2014

SSRS Tips: Displaying Copyright and Trademark Symbols in Report

Recently for one of my friend asked me whether we could display copyright (©) and trademark () symbols inside SSRS report textbox. He was dealing in a retail project and wanted to show copyright and trademark symbols along with description inside a report.The company and trademark names were stored inside a sql table and he wanted to attach the symbols while displaying them in the report.
I spend sometime looking for this and finally came up with a way to display them which I'm sharing through this blog.
You have two alternatives. One is to directly display the symbols in SSRS using below expressions inside SSRS textbox. Second option is to use analogous T-SQL functions to concatenate the symbols to the description in the query behind and bring it to SSRS report to display them directly. I've shown both the methods below.

Copyright Symbol (©)
------------------------
Copyright symbol corresponds to an unicode value of  169 in decimal or 00A9 hex, so we can make use of this to display the character.
In SSRS, you can use ChrW function for this purpose as shown by the expression below

=ChrW(169) & "Your Company Ltd"

The report will display it as below





In T-SQL you can use CHAR function for displaying this by passing either hex or decimal values
See the sample query with result below


TradeMark Symbol ()
--------------------------
The unicode value for Trademark symbol is 8482 so you can use the below expression in SSRS expression

="Your Product Name" & ChrW(8482)

However if you use same value in T-SQL it doesnt work as per the output below

For some reason in T-SQL trademark symbol corresponds to an unicode value of decimal 153 or in hex 0x0099


Hope this would come handy for someone with similar requirements. As always feel free to revert for any clarification or comments on the above.

No comments:

Post a Comment