nostro Posted January 10, 2007 Share Posted January 10, 2007 Hi I want to import a static method doit(Timestamp time) from the class com.core.report.Util to be use in a report. So I added this to the report: <import value="com.core.report.Util" /> and used it within a textField like:Util.doit($F{time}) But iReport doesn't compile and throws an exception: net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: 1. Only a type can be imported. com.core.report.Util resolves to a package import com.core.report.Util; <--------------------------------------------------------------------------------------> 2. Util cannot be resolved value = (java.lang.String)(Util.doit(((java.sql.Timestamp)field_time.getValue()))); I also set the classpath in iReports and played around with the compiler options. However, if I use that in my own application it works fine. Link to comment Share on other sites More sharing options...
nostro Posted January 19, 2007 Author Share Posted January 19, 2007 Ok, I corrected the classpath! Now it works Post edited by: nostro, at: 2007/01/19 14:12 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now