BIRT support for Rich text format

Dharmendra
edited February 11, 2022 in Analytics #1
<p><span>Hi All,

We are designing a report in which we need to display data in a field. This data comes from database and has RTF tags embedded.
When the data is rendered RTF tags are not converted by BIRT and are displayed as it is.

Please let us know if BIRT supports displaying RTF data and if it does, what changes we need to make.</span></p>

Comments

  • <p>BIRT does not have a native RTF emitter.  RTF will need to be converted to HTML.  I referenced to following page to convert RTF to HTML and wrote a very basic Java class that I used in a sample report.</p><p> </p><p><a data-ipb='nomediaparse' href='http://www.codeproject.com/Tips/136483/Java-How-to-convert-RTF-into-HTML'>http://www.codeproject.com/Tips/136483/Java-How-to-convert-RTF-into-HTML</a></p><p> </p><p>I used the BIRT Designer Pro to create the BIRT Eclipse project in the attached zip.  I used the static data set to point to an RTF file on my filesystem and a Text item to display the HTML.  The sample RTF is included in the project, and the converter.jar contains both the class and source.</p>
  • <p>Hi,</p>
    <p> </p>
    <p>because your example is throwing some errors, i removed the data source. So i created a grid with two text elements formatted in html. For one i try to get text from file test.rtf. For second i try to get text from rtf-code inside. But both times result is empty. What am i missing?</p>
    <p> </p>
    <p>Kind regards</p>
    <p> </p>
    <p>Marina</p>