Mixed text formats within a text label



  • Hi Chris,

    Yes! It is possible to use different text styles within a single Static Text or Text Field element. You are on the right track with the Markup Types. You need to select your Static Text/Text Field element and select "html" in the menu. This allows you to use CSS style properties within HTML markup to set different styles within your text using "<span></span>" tags

    For example, this text...

    <span style="font-family:RobotoCondensed-Bold;font-size:9px;text-decoration:underline;">Enrollment by Ethnicity</span><br>
    <span style="font-family:RobotoCondensed-Bold;">What data was used:</span> Race and ethnicity (reported race field) data in Illuminate. Using selected student set, the data is aggregated using federal guidelines. For example, Hispanic will take precedence over race indicated, Asian races are collapsed into one category, and any child with two or more races is placed into the “Two or More Races” category unless they are hispanic. Students are counted only once across all categories.

    ...will output this...


    I most commonly use the following CSS style properties:

    font-size (although I find this unpredictable...experiment to get the results you want)

    There are lots of other CSS properties, but you may find some are limited (or unusable) within the scope of Jaspersoft Studio. If you need more examples or help, feel free to reach out.


  • Avatar
    Chris Moggia

    Yep.  I see that now.  For some reason I couldn't get it to work before.  But by setting it to HTML I can use most HTML tags.  For example, I just used < b> BOLD < /b> and it works.

    Thanks Jeff!


    P.S.  I hope version 7.2 has a WYSIWIG editor that allows us to do this and then generates the HTML!

  • The reason I say font-size is unpredictable is illustrated in that example. Notice font-size for the headline is set to "9px." The entire Static Text element is set to 9px, but the headline still appears bigger. I'm not sure why it interprets it this way, but that's why I say "experiment."

    If you're just adding color or weight, you don't need to worry about that.

  • It doesn't...been using 7.2 for a couple months now. Still requires HTML/CSS. : (

  • Avatar
    Chris Moggia

    Major bummer!  Even zendesk let's us do that!

Please sign in to leave a comment.