SSRS Superscript CHRW

Using the Visual Basic ChrW() function is one of the methods to display superscript and subscript characters. This ChrW() function will help you to display the characters based on the Unicode code point integer that you give. For instance, you can make this placeholder expression for CO₂ Levels by using the Sub. Code for 2 from the table below:

=”CO” & ChrW (8322) & “Levels”

Number Superscript Subscript Super. Code Super. usage Sub. Code Sub. Usage
0 0 0 8304 ChrW (8304) 8320 ChrW (8320)
1 1 1 185 ChrW (185) 8321 ChrW (8321)
2 2 2 178 ChrW (178) 8322 ChrW (8322)
3 3 3 179 ChrW (179) 8323 ChrW (8323)
4 4 4 8308 ChrW (8308) 8324 ChrW (8324)
5 5 5 8309 ChrW (8309) 8325 ChrW (8325)
6 6 6 8310 ChrW (8310) 8326 ChrW (8326)
7 7 7 8311 ChrW (8311) 8327 ChrW (8327)
8 8 8 8312 ChrW (8312) 8328 ChrW (8328)
9 9 9 8313 ChrW (8313) 8329 ChrW (8329)

There might be a time when you need to display numbers in superscript or subscript format in a SSRS report. For instance, you just recently ran into a report that needed footnotes describing the contents of columns. You may also think that the number subscripting and superscripting is important for those who have to display the chemical or mathematical formulas.

If you check out the font properties available in SSRS you will not be able to find these options available. The good news is that there is a way out. There is a thing called Unicode font that will help you to show numbers in the superscript or subscript styles in a SSRS report. This one has special characters that show as superscripted and subscripted versions of the common number characters. The table above lists the integer code points that represent the superscript and subscript versions of the number characters. These characters are able to be directly shown or by using the character codes in the expression in SSRS.

Aside from using the Visual Basic ChrW() function, another way is to use the Unicode font. If you want to use this method, you will have to choose a Unicode font to use for your header text that includes the special superscript and subscript characters. The most recommended one is Lucida Sans Unicode. If you have a plan to include these characters, all that should be done is to copy and paste them where you need them as plain text. If you selected a compatible one, everything will be fine and you will not see any problems seeing your superscripts and subscripts both while you are designing your SSRS report. For instance, if you want to use CO₂ Levels, you can just try to copy and paste the example text directly into the column header in your report that you have already set up with a good Unicode font. Can you see the subscripted 2 appears just as it should? Now, you can try to directly copy a superscript character from the table above and use it instead.

In the properties of the placeholder, the next thing that you need to do is to make sure to select the correct Unicode font that includes the superscript and subscript characters. After that, in your placeholder, you will have to paste the right character that you need and set up an expression like this:

=”” & ChrW (8322)

There are tons of Unicode characters that you may want to use in your SSRS reports apart from the one set listed in the table above. You are able to find the other characters in the Windows Character Map application as well as on the official website of Unicode Map. What’s good about these places is the fact that they include the hexadecimal code point for the characters. For everyone who is planning to use that info in the Chrw() function, you must convert the hexadecimal number to a binary number, which can be done online with a tool like Match is Fun converter.

These are some other Unicode characters that you may want to include in the reports. Here are some of the other characters:

⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ⁺ ⁻ ⁼ ⁽ ⁾

₀ ₁ ₂ ₃ ₄ ₅ ₆ ₇ ₈ ₉ ₊ ₋ ₌ ₍ ₎

ᵃ ᵇ ᶜ ᵈ ᵉ ᶠ ᵍ ʰ ⁱ ʲ ᵏ ˡ ᵐ ⁿ ᵒ ᵖ ʳ ˢ ᵗ ᵘ ᵛ ʷ ˣ ʸ ᶻ

ᴬ ᴮ ᴰ ᴱ ᴳ ᴴ ᴵ ᴶ ᴷ ᴸ ᴹ ᴺ ᴼ ᴾ ᴿ ᵀ ᵁ ᵂ

ₐ ₑ ᵢ ₒ ᵣ ᵤ ᵥ ₓ

½ ¼ ¾ ⅓ ⅔ ⅕ ⅖ ⅗ ⅘ ⅙ ⅚ ⅛ ⅜ ⅝ ⅞ № ℠ ™ ©

SQL Server Reporting Services, which is more known as SSRS in short, is the name of the reporting software that allows you to make a formatted report with the tables in the form of graphs, image, data, and charts. There is a server that hosts all the reports so that they are able to be executed any time using parameters defined by the users. It is part of the Microsoft SQL Server Service suite.

SSRS has some important components, which include:

  • Report Builder: This one is an ad hoc report publishing tool that is executed on the computer of the client. The component has a drag and drop interface that can be used easily.
  • Report Designer: This one helps you to develop all kinds of reports. This tool is a publishing one, that is hosted in Visual Studio or Business Intelligence Development Studio or BIDS.
  • Report Manager: This one will check the report, matching it with the given requirements. The decisions are usually made based on those reports.
  • Report Server: This one is a server that uses the SQL Server database engine to store metadata information.
  • Report server database: This one stores metadata, resources, report definitions, delivery data, security settings, and so on.

Leave a Reply

Your email address will not be published. Required fields are marked *