0

I have a font with a space in its name, and it is not recognized when displaying the report with IE11 (which is the browser I have to work with).

Strangely, it is recognized with IE8, but I can't use it...

If I manually change (via F12) the CSS from font-family: Code 128; to font-family: "Code 128"; or font-family: Code128;, it displays correctly in IE11.

Is there a way to force SSRS to use quotation marks for font-family when rendering reports in HTML?

I couldn't find anything on this, and it seems that writing "Code 128" and Code128 in the properties field doesn't work ("Property value is not valid.")

EDIT

So I finally managed to get it to work for Html rendering by writing this:

FontFamily : =""Code 128""

But then the font isn't recognized when exporting to say pdf

Rafalon
  • 4,450
  • 2
  • 16
  • 30
  • I'm assuming you've already installed the font to your SSRS server as [this link](https://stackoverflow.com/questions/45717894/ssrs-where-install-the-font) describes. It seems to me that SSRS allows spaces in the `font-family` property so if the font is installed on the local machine for development and the SSRS server with font embedding enabled, it should work. Another less desirable solution would be to use placeholders for the text and use `HTML Markup` to simply change the font using HTML tags. – Steve-o169 Feb 28 '19 at 13:52
  • I indeed installed the font, my problem is that it generates `font-family: Code 128;` and this isn't recognized by IE11, but it is recognized by IE8 – Rafalon Feb 28 '19 at 14:59
  • I've seen some sites that recommend entering the `font-family` property as an expression such as `="Code 128"`. Perhaps give that a shot? – Steve-o169 Feb 28 '19 at 15:06
  • I just tried it, and it gives the same output (SSRS FontFamily field : `="Code 128"`, HTML output : `font-family: Code 128;` and so no rendered by IE11) I even tried `="""Code 128"""` but no luck, it outputs `font-family: "";` – Rafalon Feb 28 '19 at 15:14

1 Answers1

0

After seeing that using =""Code 128"" worked for HTML rendering, but not for pdf export, I tried the following, and it worked both for HTML and export:

=IIF(Globals!RenderFormat.IsInteractive, ""Code 128"", "Code 128")
Rafalon
  • 4,450
  • 2
  • 16
  • 30