
Hello
I have a report that uses a custom font (ttf). The font is installed on the computer.
In Report Designer, the font is rendered correctly, however when I load the report (from a local file) into our wpf application (report viewer) the font is not displayed correctly, i.e. it shows a different font.
When exporting the report to PDF or Excel etc the report is once again correct.
We are not using report server - everything is generated locally.
Any hints on what might cause this?
8 Answers, 1 is accepted
The used fonts must be installed on the machine where reports are processed and rendered.
Other approach is to use Telerik Reporting R3 2016 or greater, where we introduced the Private Fonts feature.
Let us know if you need further help.
Regards,
Stef
Telerik by Progress

Hello,
Do you have any C# code sample to do this with Telerik Reporting R3 2016 or greater? The documentation only refers to config files.
Thanks
Please check the attached demo project. You may need to run the Upgrade Wizard to update its assembly references. Private fonts should be configured through the application's configuration file.
We will appreciate it if you let us know more details about the reason to need to configure private fonts in code only.
Regards,
Stef
Telerik by Progress

Greetings,
Thanks for the sample, in VB too :)
Yes. Had to use the upgrade wizard to run against 2016 R3, even after having manually replaced the DLLs to the latest version. I *think* the sample is working, its just that the Gotham Book you chose is pretty close in style to MS Sans Serif on my screen.
Please try the attached font file, "Oblivious", from the same great font source you obtained Gotham Book.I get a REST API error when I try to use it. Simply rename the extension from png to ttf as your upload filters only allow graphics
Reason to need to configure private fonts in code only? Its to do with specialised reporting needs. For example, if you've ever done financial reporting where you've had to display large financial numbers, you usually run out of horizontal space unless you abbrieviate them. These are situations where you display multiple columns side by side, before showing a chart (or something) next to the table.
In these scenarios, a condensed font makes all the difference as it enables you to avoid reducing the the font size and still to use half the horizontal space. I moved over from one your competitors products which used to allow me to do this. Always wondered why the functionality was not there by default.
Best regards
I used to use a competitors product
The attached demo project uses the provided "Oblivious font" successfully for its HTML, Image, PDF rendering. Settings applied through the configuration file are applied to programmatically exported reports as well.
Font settings can checked in:
- Reports/Report1.cs
- Web.config
- WebForm1.aspx
Regards,
Stef
Telerik by Progress

Stef,
Thanks for the sample, but I don't have access to v11.0.17.201, and was hoping to confirm that it works against R3 2016 as discussed.
Based on the attached v11.0.17.201.sample, I modified the web.config of the earlier (converted to R3 2016) sample and noticed that the real issue is that the sample project has cached the report, and so any changes even in the report designer are not reflected when the report is run.
Thanks,
Yemi
Please downgrade the provided project by using the Upgrade Wizard. Then restart the browser to create a new viewer.
Cached content is taken from teh Reporting REST service storage if the same viewer (clientId) requests the same report (name and parameters combination). By creating a new clientId, the report will be processed again. you can also change the cache storage location by updating the Reporting REST Service's HostAppId for development and test purposes. Or a hack is to add a DateTime report parameter in the report, and always set a new value for it through the viewer's reportSource.
Details when and how cache entries are deleted are available in Cache Management.
Regards,
Stef
Telerik by Progress

Stef,
Ok that worked, both the downgrade and the displaying of the font. Oblivious was just a sample as its really a condensed font I need.
Can play around with this sample to get what I need.
Thanks for your help & on the pointers to the cache management