开发者

JaseperReports plugin for Netbeans classpath problem

I've installed the JasperReport 4.11 plugin for Netbeans (6.9.1).

I've realized a simple bean like the following:

package jr;
import java.io.Serializable;
    public class Person implements Serializable {

    private String name;
    private String lastname;

    public String getLastname() {
        return lastname;
    }

    //all the other setters and getters

}

When i edit the开发者_如何学Go report into the "Report Query" dialog (left click + right click on the background and chose "edit query"), into the panel JavaBean datasource i write the class name:

jr.Person

and I click on "Read attributes"

i get the error:

"Class not found error!! Controlla il tuo classpath e riprova!" (the second part is localized in italian... translation: "check your classpath and try again") It seems like the JasperReports plugin for Netbeans doesn't use the classpath of the project! (I have build the project, of course) How can i solve this?


You're right Agostino, the iReport plugin has it's own classpath and won't use the one of the project. Annoying isn't it!

You need to go to Tools > Options and then select iReport at the top. Click on the classpath tab and add all the neccessary libraries there. I'm not sure which libraries you will need for your report to work. I include jasperreports-extensions-3.5.3.jar and hsqldb-1.8.0-10.jar in my classpath, but I'm using JasperReports 3.7.6 so I think it would be different in your case.


I haven't used the tool w/ the plugin and a java project setup. But I know when I grab the standalone ireports I need to go the configurations and classpath and add the jar to classpath. I would try to do something simliar.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜