Friday, November 29, 2013

Hexadecimal value, is an invalid character: SSRS 2012

Hi,Today i have encounter below issue while deploying my report on SSRS 2012 Report manager.
Report is working fine in MS Visual studio during development,but when i had deployed the same report on report manager i was getting below Error message:

Error :The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version.
There is an error in XML document (1, 12827).
' ', hexadecimal value 0x1A, is an invalid character. Line 1, position 12827.




Issue Root cause:
      "This problem occurs because a non printable character is populated into a report parameter that you define in the report".










Solution:
Step1: Check the ASCII number for non printable character  using below statement.
select ASCII(' ')

Note:Might be it will not display on  SSMS,but when you execute select statement you will get  number. in my case it is 26.
Step2: Just use REPLACE() function in your query to eliminate non printable character.

select distinct REPLACE(title, CHAR(26),',') as title from analytics..<<Table_Name>>
order by title desc

 Tag:(SSRS, xml, non printable character, Ascii, Char, Replace)
  

2 comments: