How To Work On Font

This recipe illustrates how to set Font using Script.

Major steps include the following:

  1. Create a report template (SampleFontScript.rml).
  2. Add the following data fields into under “Section Header”:Field Type (Literal): Sample (Original)Field Type (Literal): Sample (setFontSize(Integer))
    Scripts > On Render Begin: setFontSize(500)Field Type (Literal): Sample (setFontName(String))
    Scripts > On Render Begin: setFontName(“Tahoma”)Field Type (Literal): Sample (setFontColor(String))
    Scripts > On Render Begin: setFontColor(“RED”)Field Type (Literal): Sample (setFontBold(boolean))
    Scripts > On Render Begin: setFontBold(true)Field Type (Literal): Sample (setFontItalic(boolean))
    Scripts > On Render Begin: setFontItalic(true)Field Type (Literal): Sample (setFontUnderline(boolean))
    Scripts > On Render Begin: setFontUnderline(true);Field Type (Literal): Sample (setFontStrikethrough(boolean))
    Scripts > On Render Begin: setFontStrikethrough(true);

Font

To download the necessary files for this recipe, refer to the attached ZIP file.
Font.zip (2.4 KB)