Jump to content
JasperReports Library 7.0 is now available ×

Using my own class in a report


2006 IR Open Dicussion

Recommended Posts

By: cyclistca - cyclistca

Using my own class in a report

2006-01-27 11:20

Ok another new Java/iReport newbie here. I've created a Java report. For one of the variables that I have defined I want to call a class that I have created.

 

I used the following syntax in iReports in the "Initial value expression".

 

new String (TimeSheetReportHelper.GetTest($P{P1},$P{P2},$P{P3}))

 

I've placed the class TimeSheetReportHelper in the same folder as my report source.

 

The Class looks like this.

 

public class TimeSheetReportHelper {

static String TestCD;

 

public static String getTest(String P1, String P2, String P3) {

 

TestCD = P1 + P2 + P3;

return (TestCD);

}

 

}

 

When I compile I get the following error

 

The method GetTest(String, String, String) is undefined for the type

TimeSheetReportHelper

value = (java.lang.String)(new String (TimeSheetReportHelper.GetTest(((java.lang.String)parameter_UNIT_ID.getValue()),((java.lang.String)parameter_EMPLOYEE_ID.getValue()),((java.lang.String)parameter_SUBUNIT_ID.getValue()))));

 

In practice it will be doing a lot more. I'm trying to understand how to set this up first.

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