Jump to content
  • Possible problems with styled text super/subscripting?

    Assigned User teodord
    CategoryBug report

    There's not much documentation on styling text with super and subscripts. After some searching I'm led to believe that it exists in JasperReports 1.2.6 and above (I'm currently using 1.2.7) and that the syntax is:




    for superscripting and subscripting, respectively.


    I've had problems getting either to work. I've also tried


    also to no effect.


    I've provided a report definition .jasper file (generated by iReport) and a data source .csv file (CSV) to show my super/subscripting "experiments" (zipped up in a folder as SupSubTest.zip).


    If I'm doing something wrong I would appreciate some advice. In addition I would recommend updating the styled text example on the web to include super/subscripting.


    Also, if



    does, in fact, work I would recommend implementing

    as well for consistency with the existing styling syntax.


    If there is indeed a bug with super/subscripting then here's notice of it.



    Gary Nunes

    Attachments: SupSubTest.zip

    User Feedback

    Recommended Comments

    One more thing:


    Please note that the CSV data source file was supplied field names of "Comments" and "StyledText" by my testing framework when running the report.


    Sorry if this inconviences you but you should still be able to see what I was doing by just looking at the CSV file contents.


    The first field of each record is a comment while the second field is the actual styled text.

    Link to comment
    Share on other sites




    What version of JDK/JRE are your using.

    There is a bug related to this that seems to be fixed only since JDK 1.5:



    Check the supplied /demo/samples/styledtext sample provided with the project source files for details about the syntax. We currently support only element tags and not attributes. If you think you need attributes too, please post it as a feature request.


    Thank you,



    Link to comment
    Share on other sites



    Thanks for the help.


    I was using JDK 1.4.x in my application. Switching to JDK 1.5.x did the trick (interesting though that super/subscripts works in text fields in 1.4.x but not in JasperReports).


    May I suggest that the web site styled text sample be updated to reflect the latest styling syntax (it does not currently include examples of super/subscripting).


    With regard to lack of super/subscript attributes: I don\'t think I need them. I just noticed (while in the process of writing a Document --> JasperReports style syntax encoder) the inconsistency.


    Again, thanks.


    Gary Nunes

    Link to comment
    Share on other sites

  • Create New...