Archive for the ‘ireport’ Category

Exception in thread “Thread-6″ java.lang.NoClassDefFoundError: org/codehaus/groovy/control/CompilationFailedException

Sunday, November 29th, 2009

I am using netbeans and iReport 3.6.0. The reports are working fine running from iReport preview but I got an error when I tried to launch the report from the application:

Exception in thread "Thread-6" java.lang.NoClassDefFoundError: org/codehaus/groovy/control/CompilationFailedException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)

SOLUTION 1:
Open jrxml file and remove language=”groovy”

SOLUTION 2:
Add groovy-all-1.5.5.jar to your library path

how to “send to back” or “bring to front” an object inside the iReport

Sunday, December 14th, 2008

I used iReport version 2.0.2. in the past before I installed a new iReport version 3.1.2 few days ago.

User has to click with right button on the object inside the report and select either “Send to back” either “Bring to front” to change Z-order in the old iReport version.

I could not find “Send to back” and “Bring to front” options in a new version. I tried to find a solution with google but I did not find any useful information.

So here is the solution:
1.select the object on the report (for example rectangle)
2.find Opaque in properties
3.uncheck the check box value

I hope this will help you.

Do you find this post useful? Do not hesitate to leave a reply! Go to the bottom of this page.

Exception in thread “Thread-6″ java.lang.NoSuchMethodError: com.lowagie.text.Image.getPlainWidth()F

Thursday, December 11th, 2008

I used jasperReports version 2.0.2. in the past. I decided to upgrade my jasperReports library and I selected the latest version at the moment – JasperReports 3.1.2. I got the error below when I executed particular report:

Exception in thread "Thread-6" java.lang.NoSuchMethodError: com.lowagie.text.Image.getPlainWidth()F

Majority of the reports work fine. I found out that the problem is connected to itext library. I used itext-1.3.1.jar before. I have downloaded the latest itext library (iText-2.1.4.jar) and the error has gone away.

Do you find this post useful? Do not hesitate to leave a reply! Go to the bottom of this page.

net.sf.jasperreports.engine.JRException: com.sun.org.apache.xerces.internal impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.

Thursday, December 11th, 2008

I used iReport version 2.0.2 in the past. Today I installed a new version of iReport 3.1.2. It looks great. I have reopened the report and suddenly I got an error:

net.sf.jasperreports.engine.JRException: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.

I have installed plugin for XML (Tools->Plugins->Available plugins->XML and Schema). I restarted the ireport but I got a new error:

net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException: The element type "queryString" must be terminated by the matching end-tag "".

I have restored my report from backup and I have opened the iReport once again. I have modified the report and closed the iReport. Everything works fine after reopening the iReport.

My suggestion:
Install “XML and Schema” plugin immediatelly after installing a new iReport version.

Do you find this post useful? Do not hesitate to leave a reply! Go to the bottom of this page.

ireport jasperreports background color according to cell value crosstab

Monday, October 6th, 2008

Would you like to choose different color for particular cell? Imagine that you have a crosstab with 5 rows and 5 columns. Cell could have a value between 1 and 10. You would like to have different background color for each value. How to achieve that?

1.Menu Format->Styles (add a single style)

2.Define 10 different style conditions (example: new Boolean($V{cell_color}.toString().equals(“1″))

3.For each different style condition define different backcolor

Do you find this post useful? Do not hesitate to leave a reply! Go to the bottom of this page.