Forum Discussion

tuhler's avatar
tuhler
New Contributor III
10 months ago

Availability to add a custom font to PDF export

We have a client with a custom font that they would like to apply to reports that are exported to PDF. Has anyone come across this as an option?

Thank you

  • Easier than you might expect:

    1. install the font in Windows on OneStream servers (app and web)
    2. specify it in your format properties: FontFamily = [My Custom Font]
    3. ...
    4. Profit!

    The only drawback is that you cannot differentiate between Data Explorer and PDF reports, the same font will be used for both. You can change size and color only.

    As proof, I attach a screenshot of the classy Bauhaus 93 font in action, so called because nobody ever used it after 1993. The particularly hideous "Coral" color was chosen to further stress the idea that the product will express no judgement on one's terrible taste.

    EDIT 2024-04-11: It turns out that there are a few caveats.

    • Any font has to be installed on the CLIENT machine.
    • If using a nonstandard font, PDF reports might not be able to use it in v8+ (unclear why, for now). As a workaround, we can use a Cube View Extender that will set the font dynamically - in which case, the font will be picked up and displayed in the report. Example:
      ' in CV Extender "_TestFont"
      [...]
      Case Is = CVExtenderFunctionType.FormatReportUIItem
      
      	Dim uiItem As CVExtenderReportUIItem = args.Report.CurrentUIItem
      	If uiItem.UIItemType = XFReportUIItemType.RowHeaderLabel Then
      		uiItem.FontFamily = "Bauhaus 93"
      	End If
      

       

  • JackLacava's avatar
    JackLacava
    Honored Contributor

    Easier than you might expect:

    1. install the font in Windows on OneStream servers (app and web)
    2. specify it in your format properties: FontFamily = [My Custom Font]
    3. ...
    4. Profit!

    The only drawback is that you cannot differentiate between Data Explorer and PDF reports, the same font will be used for both. You can change size and color only.

    As proof, I attach a screenshot of the classy Bauhaus 93 font in action, so called because nobody ever used it after 1993. The particularly hideous "Coral" color was chosen to further stress the idea that the product will express no judgement on one's terrible taste.

    EDIT 2024-04-11: It turns out that there are a few caveats.

    • Any font has to be installed on the CLIENT machine.
    • If using a nonstandard font, PDF reports might not be able to use it in v8+ (unclear why, for now). As a workaround, we can use a Cube View Extender that will set the font dynamically - in which case, the font will be picked up and displayed in the report. Example:
      ' in CV Extender "_TestFont"
      [...]
      Case Is = CVExtenderFunctionType.FormatReportUIItem
      
      	Dim uiItem As CVExtenderReportUIItem = args.Report.CurrentUIItem
      	If uiItem.UIItemType = XFReportUIItemType.RowHeaderLabel Then
      		uiItem.FontFamily = "Bauhaus 93"
      	End If
      

       

    • tuhler's avatar
      tuhler
      New Contributor III

      Are you successfully able to do this in version 8? We got the fonts installed but were still unable to use them. Support said maybe because it is version 8

  • Hi,

    Try check in a CV

    For general settings: CV/Advanced/CubeViewProperties/ Report: Here you can set the settings for the PDF output

    For columns or rows: CV/Advanced/Columns or Rows/Formatting/ headerFormat or cellFormat or cellType/(3 dots)/ Format/ Reporting segment: There you can setup the items you selected before.

    Regards