Jump to content
We've recently updated our Privacy Statement, available here ×

JR and Helper classes


jeenajeena

Recommended Posts

I wrote this class

 

public class MyUtil {

 

public static int getLastDayOfMonthXXX() {

return 10;

}

 

public static int getLastDayOfMonth() {

return 10;

}

 

}

 

 

I compiled it and added it's directory to classpath, throu iReport.

 

If I use this expression in a field

 

new Integer(MyUtil.getLastDayOfMonth())

 

everything is OK.

 

But if I use

 

new Integer(MyUtil.getLastDayOfMonthXXX())

 

I obtain the error:

 

Error filling print...Error evaluating expression :

source text : new Integer(MyUtil.getLastDayOfMonthXXX())

java.lang.NoSuchMethodError : MyUtil.getLastDayOfMonthXXX()I

 

Why?

What I'm trying to do is define a bunch of static methods to be used in fields' expressions. May be I'm using the wrong approach..

 

Any help will be very appreciated

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...