2008 SSRS Report from CRM 2011: Font with space in its name not rendering correctly

Google was truly not my friend for this one, so now I’ve hacked fixed it, I’m giving back in case anyone has the same issue.

I’ve been tasked with creating some pretty reports in SSRS 2008, which will run from CRM 2011. The company font I’ve been asked to use is Century Gothic.

I created the reports, which rendering perfectly in preview mode and when creating PDFs in SSRS. I then uploaded the reports to CRM, and ran it from its entity.

All instances of Century Gothic came out as Times New Roman. The same happened when exporting it to PDF. Century Gothic didn’t appear to be installed on the CRM report server, so I installed it on there and scheduled the server reboot overnight.

The next day, it was still Times New Roman, except for one textbox which had Century Gothic displayed correctly.

Looking under the hood with developer tools, I saw this:

ssrs-crm-font-1

I cracked open the code, but I couldn’t see any difference between the working correctly textbox, and the others, which had the split font name. I tried putting quotes, singe and double, round the font name in the code, but Visual Studio then couldn’t resolve the font name correctly itself.

I tried other fonts with two names, and got the same problem.

Looking at the working textbox, I saw that the textbox itself didn’t have a font set, only the selected text inside:

ssrs-crm-font-2 ssrs-crm-font-3

The broken textboxes had the font applied directly to it. Creating a new blank textbox automatically assigns a font to the box, which can’t be cleared.

So how to fix it? The working textbox had a bit of Arial text in it as well. So that gave me the idea to add a couple of spaces to the end of each Century Gothic textbox, and make one of those spaces Arial.

That cleared the Font property on the textbox, and then the Century Gothic font started displaying.

What a horrible, hacky fix 😦