SSRS Hex Function

The SSRS Hex function is a Conversion function that will return the string representation of a given hexadecimal value of a numeric field or number. The syntax of the Hex function for returning the string representing a hexadecimal number is as shown below.

=Hex(50)

We use the Employee table below, which has 20 records, to demonstrate the Hex function in reporting services. The image shows the records in the Table report.

Source Table

SSRS Hex function Example

For this, let me add a new column to the right side of the Orders column. Next, right-click the textbox under the Hex and choose Expression to open the below-mentioned expression window. The Hex function expression below will return the string representation of the hexadecimal value of a number in the OrderQuantity column. As the numbers are very small, we multiplied them by 15.

  1. More Functions
  2. Charts
  3. Tables
  4. Format tables
  5. SSRS
=Hex(Fields!OrderQuantity.Value * 15)
SSRS Hex Function expression to show the string representation of hexadecimal values

Similarly, let me create a new column to show an SSRS Hex function with a few more strings representing hexadecimal numbers by multiplying the OrderQuantity column values by 20.

=Hex(Fields!OrderQuantity.Value * 20)

Please click the preview tab to see the Hex report.

SSRS Hex Function o show the string representation of hexadecimal values report