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.
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.
=Hex(Fields!OrderQuantity.Value * 15)
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.