Reputation: 609
I inserted a HTML element into my japserreporttest.jrxml and the code generated automatically is like this:
<componentElement>
<reportElement x="466" y="579" width="100" height="30" uuid="4d62f8bd-23d4-4199-97bb-a703a0769a8c"/>
<hc:html xmlns:hc="http://jasperreports.sourceforge.net/htmlcomponent" xsi:schemaLocation="http://jasperreports.sourceforge.net/htmlcomponent http://jasperreports.sourceforge.net/xsd/htmlcomponent.xsd" scaleType="RetainShape" horizontalAlign="Left" verticalAlign="Middle">
<hc:htmlContentExpression><![CDATA["<p style='background-color:yellow;'>HTML paragraph</p>"]]></hc:htmlContentExpression>
</hc:html>
</componentElement>
But when I tried to generate the report I get the following error "http://jasperreports.sourceforge.net/xsd/htmlcomponent.xsd cannot be read". I input this URL in browser and get the 404 error. Do you know what happened with source forge?
Upvotes: 1
Views: 2882
Reputation: 82
To solve this, you should add the library jasperreports-htmlcomponent.
If you are using maven you add :
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports-htmlcomponent</artifactId>
<version>5.0.1</version>
</dependency>
Else this is a link to the jar : http://maven.sonner.com.br/~maven2/net/sf/jasperreports/jasperreports-htmlcomponent/5.0.1/
Upvotes: 2