Hexadecimal Values in SQL Server Reporting Services (SSRS) Reports


By Garth Jones

I ran across this error when I tried passing a hexadecimal (hex) value (0x1) from one report to another report.

Conversion failed when converting the varchar value ‘0x1’ to data type int. (Microsoft SQL Server, Error: 245)

It turns out that SQL Server Reporting Services (SSRS) will treat the hex value as a string and not an integer! It also didn’t help that I was mixing both hex and integers in the same query.

What did I do to fix this problem? Fortunately there was an easy solution. I simply converted my hex values over to integers. It took me a few minutes to resolve, but now everything is good.


Leave a Comment

Share via
Copy link