аппарат теплообменный пластинчатый разборный | насос циркуляционный для отопления | насосы для отопления | насосы циркуляционные для отопления | насосы челябинск | пластинчатые теплообменники цена | пластинчатый теплообменник цена | теплообменник alfa laval | теплообменник пластинчатый разборный | теплообменное оборудование | модульные котельные | проект блочно модульной котельной

How to add HTML Markup to JRXML in Jasper Reports/JasperSoft Studio/IReport

Last modified date

I had a years of experience working on Jasper Reports/IReport/JasperSoft Studio but sometimes i even come across crucial situtation in developing reports as per the client needs. So today i am going to expain how to add HTML Markup language in to your report to show your report content as your feel it to be.

Tts very simple to implement HTML Markup to Jasper Reports/IReport/JasperSoft Studio but there are few thing you must do before you want to add some HTML properties to JRXML file. As we know that Jasper Reports/IReport/JasperSoft Studio is puerly an XML file related structure which totally depends on it, but the jasperreports community documentation says that doing certain changes you can add HTML to JRXML so lets begin with it.

Important things to do before you add HTML Markup to JRXML

1. You need to add markup=”styled” to your specfic staticText element.
2. Using style tag you can add HTML markup coder to your text and make sure you close with the style tag

    <reportElement mode="Opaque" x="0" y="0" width="555" height="140" backcolor="#c0c0c0"/>
    <textElement markup="styled">
      <font size="16"/>
    <text><![CDATA[This is a <style isBold="true" isItalic="true" isUnderline="true">static text</style> 
      element containing styled text. <style backcolor="yellow" isBold="true" isItalic="true">Styled text</style> 
      elements are introduced by setting the <style forecolor="blue" isItalic="true">markup</style> attribute 
      available for the <style isBold="true" forecolor="magenta">textElement</style> tag to 
      <style forecolor="red" isItalic="true">styled</style> and by formatting the text content using nested 
      <style isBold="true" forecolor="green">style</style> tags and simple HTML tags.]] >


This worked for me well and you can read the complete documentation of this click here : http://jasperreports.sourceforge.net/sample.reference/markup/