Jump to content
Changes to the Jaspersoft community edition download ×

External Class question

2005 IR Help

Recommended Posts

By: hillary - wikkitt

External Class question

2005-10-26 08:21

Where do I put an external class for my report to use?

Do I have to create a jar file?

I tried putting my class file in the lib folder but ireport won't read it.


I need to pass the class a comma delimited string of numbers. A method will then break up the string and put the individual numbers into a HashMap that the report can read.








By: hillary - wikkitt

RE: External Class question

2005-10-26 10:18

Hi all,


Ok, I got my report to read the class, but my method is not working.


I read in the manual(pg96-97) that if you passed a $P{} to the external method, it would be passed as a map object and I could add to it so my report could access the processed data.


I'm just testing right now but here's my code:


public class ReportHelper {


public ReportHelper() { }


public static Boolean myName(Object map){

String key = "my_name";

String name = "Mud";


return true;




I placed a textfield on my report and in the "Print When expression" I put:




But apparently iReports doesn't send it as a map, but sends the value of that parameter instead.


Like i said above, I need to send it a srting of numbers and return the individual numbers plus some math results from those numbers.


Any suggestions?

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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...