Report exported to PDF causes all the spaces in between the words to be compressed

Have you come across a similar situation when you’ve a report with textbox within or outside a tablix, containing an expression. When you view the report in browser everything looks great. The moment you export the report to PDF and open the same, to your disappointment you see the space in between the words are no more and the words are compressed. All the other formats show the report to be perfectly fine. This looks exactly like below:

In Browser:

image

In PDF:

image

If you carefully observe, the line one between the above two images differ. This is what I’m precisely talking about.

Now, do you know what causes this issue?

You check your source data and everything seems to be perfectly intact. Let me tell you what it is actually. There is a character called “Zero width space” which has the unicode representation of “U+200B”. The presence of this character is virtually un noticeable. Hence it appears everything seems to be fine at the source data view.

There are some issue WRT how we handle this character when it comes to PDF and hence this issue is a result of this.

How to get around this?

It is extremely simple. Just wrap your textbox expression with in the below expression and this will be take care off.

=Replace(Fields!Column.Value,ChrW(&h200B),"")

HTH!

Selva.

[All the posts are AS-IS with no warranty]