SSRS Export to PDF results in sentence to be concatenated into one long word

Sometimes invalid ASCII code invisible to naked eye are stored in the SQL database.
If the value with the invalid ASCII is displayed in a SSRS report and exported to PDF, the set of words become concatenated into one word
“The director of the company has given approval” displayed in a textbox in SSRS become “Thedirectorofthecompanyhasgivenapproval” in PDF.

The first character of the text value was ASCII code 63. Unfortunately there are other characters that are mapped to 63.

To remove the first character a replace function can be used

select Replace(CAST(COLUMN_NAME as varchar(max)) COLLATE SQL_Latin1_General_CP1_CI_AS, CHAR(63), ”)

The value is displayed correctly in PDF after the fix is applied.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s